test for float mapper

This commit is contained in:
Sergey Solovyev 2011-09-23 14:59:31 +04:00
parent b4749e3e91
commit 7a5685f4ba

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"));
}
}