package hudson.plugins.cobertura; import junit.framework.TestCase; /** * JUnit test for {@link Ratio} */ public class RatioTest extends TestCase { final void assertRatio(Ratio r, float numerator, float denominator) { assertEquals(numerator, r.numerator); assertEquals(denominator, r.denominator); } /** * Tests that {@link Ratio#parseValue(String)} parses correctly float * numbers with either dot or comma as decimal point. * * @throws Exception */ public void testParseValue() throws Exception { assertRatio(Ratio.create(1,2), 1.0f, 2.0f); } }