Can someone please explain what the output would be from this?
I've just come across the following in a test class and don't really understand it, would someone be able to shed some light please?
public class Test1 extends TestCase{
private Collection collection;
@Before
Public void setUp() {
collection = new ArrayList();
System.out.println(”setUp");
}
@After
Public void tearDown() {
collection.clear();
System.out.println("tearDown");
}
@Test
Public void testEmptyCollection() {
assertTrue(collection.isEmpty());
System.out.println(“Empty");
}
}
Aucun commentaire:
Enregistrer un commentaire