From ce416f56e0d41e0feb6f77caeaa54e61aaac0e13 Mon Sep 17 00:00:00 2001 From: serso Date: Fri, 23 Sep 2011 14:59:31 +0400 Subject: [PATCH] test for float mapper --- .../common/FloatIntervalMapperTest.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/test/java/org/solovyev/common/FloatIntervalMapperTest.java diff --git a/src/test/java/org/solovyev/common/FloatIntervalMapperTest.java b/src/test/java/org/solovyev/common/FloatIntervalMapperTest.java new file mode 100644 index 00000000..0db5633f --- /dev/null +++ b/src/test/java/org/solovyev/common/FloatIntervalMapperTest.java @@ -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(1.2f, 12.2f), mapper.parseValue("1.2;12.2")); + Assert.assertEquals(new IntervalImpl(0f, 0f), mapper.parseValue("0;0")); + } +}