Answer 12: Writing Another Test

    public void testSquareOneThird() {
        Fraction a = Fraction.getFraction(1, 3);
        Fraction b = a.square();
        assertEquals(b, Fraction.getFraction(1, 9));
    }

Previous | Next | Top | Cafe con Leche | Cafe au Lait

Copyright 2005 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified November 11, 2005