test for float mapper

This commit is contained in:
serso 2011-09-23 14:59:31 +04:00
parent 9ca5a2d90b
commit d2c85835d5

View File

@ -0,0 +1,21 @@
package org.solovyev.common;
import junit.framework.Assert;
import org.junit.Test;
import org.solovyev.common.utils.IntervalImpl;
/**
* User: serso
* Date: 9/23/11
* Time: 2:54 PM
*/
public class FloatIntervalMapperTest {
@Test
public void testParse() throws Exception {
final FloatIntervalMapper mapper = new FloatIntervalMapper();
Assert.assertEquals(new IntervalImpl<Float>(1.2f, 12.2f), mapper.parseValue("1.2;12.2"));
Assert.assertEquals(new IntervalImpl<Float>(0f, 0f), mapper.parseValue("0;0"));
}
}