You are on page 1of 1

Sau ta s vit mt test case n gin test mt s phng thc ca lp trn view plaincopy to clipboardprint? 1.import junit.framework.TestCase; 2.

2.public class TestPerson extends TestCase { 3.public TestPerson(String name) { 4.super(name); 5.} 6./** 7.* Xac nhan rang name duoc the hien dung dinh dang 8.*/ 9.public void testGetFullName() { 10.Person p = new Person(Aidan, Burke); 11.assertEquals(Aidan Burke, p.getFullName()); 12.} 13./** 14.* Xac nhan rang nulls da duoc xu ly chinh xac 15.*/ 16.public void testNullsInName() { 17.Person p = new Person(null, Burke); 18.assertEquals(? Burke, p.getFullName()); 19.p = new Person(Tanner, null); 20.assertEquals(Tanner ?, p.getFullName()); 21.} 22.}

You might also like