-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathActorsTest.java
More file actions
34 lines (33 loc) · 954 Bytes
/
ActorsTest.java
File metadata and controls
34 lines (33 loc) · 954 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
30
31
32
33
34
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class ActorsTest {
static String data1 , data2;
static Actors actors;
@BeforeAll
static void setUp() {
actors = new Actors("",false, "", "", "");
data1 = actors.getActorData("jennifer lawrence");
data2 = actors.getActorData("robin williams");
}
@Test
void getNetWorthViaApi1() {
assertEquals(160000000,actors.getNetWorthViaApi(data1));
}
@Test
void IsAlive1() {
assertEquals(true,actors.isAlive(data1));
}
@Test
void getNetWorthViaApi2() {
assertEquals(50000000,actors.getNetWorthViaApi(data2));
}
@Test
void IsAlive2() {
assertEquals(false,actors.isAlive(data2));
}
@Test
void getDateOfDeathViaApi2() {
assertEquals("2014-08-11", actors.getDateOfDeathViaApi(data2));
}
}