Testen mit JUnit

Kent Beck and Erich Gamma, http://junit.org/index.htm

import static org.junit.Assert.*;
class XTest {

   @Test
    public void testGetFoo() {
        Top f = new Top ();
        assertEquals (1, f.getFoo());
    }
}
http://www-128.ibm.com/developerworks/java/library/j-junit4.html

JUnit ist in Eclipse-IDE integriert (New $ \to$ JUnit Test Case $ \to$ 4.0)



2009-06-15