JUnitTesting - Panda p2 = new Panda"Lin",3,p1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
import junit.framework.TestCase; public class PandaTester extends TestCase { public void testConstructor() { Panda p1 = new Panda("Shuaung",2,null); assertEquals("Shuang",p1.getName()); assertEquals(2,p1.getChild()); assertEquals(null,p1.getFather());
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Panda p2 = new Panda("Lin",3,p1); assertEquals("Lin",p2.getName()); assertEquals(3,p2.getChild()); assertEquals(p1,p2.getFather()); } } An example of JUnit test class showing its contents A line representing the entire set of integer...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

JUnitTesting - Panda p2 = new Panda"Lin",3,p1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online