/** * OVERVIEW: The test case "test9" covers around 1.0% (low percentage) of statements in "Rational" */ @Test public void test9() throws Throwable { // The test case instantiates a "Rational" with numerator equal to 0L, // and denominator equal to -1887LL. // The execution of this constructor implicitly covers the following 1 // conditions: // - the condition " denominator equals to 0L" is FALSE; Rational rational0 = new Rational(0L, (-1887L)); // The test case declares an object of the class "String" the string // form of rational String string0 = rational0.toString(); // Then, it tests: // 1) whether "string0" is equal to "0 / -1887"; assertEquals("0 / -1887", string0); }
@Test public void test9() throws Throwable { Rational rational0 = new Rational(851L, 851L); String string0 = rational0.toString(); assertEquals("851 / 851", string0); }