forked from baur100/JavaCore2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnitTestExample.java
More file actions
29 lines (23 loc) · 636 Bytes
/
UnitTestExample.java
File metadata and controls
29 lines (23 loc) · 636 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import L10.Person;
import org.testng.Assert;
import org.testng.annotations.Test;
public class UnitTestExample {
@Test
public void testResultFromPerson(){
//Arrange
Person person = new Person("Ivan","Krotov");
//Act
String res = person.result(2,1,1);
//Assert
Assert.assertEquals(res,"Ivan4");
}
@Test
public void testLastResultMethodFromPersonInLesson10(){
//Arrange
Person doris = new Person("Doris","Sun");
//Act
String res = doris.lastResult(8,"finish");
//Assert
Assert.assertEquals(res,"Sun8finish");
}
}