-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEmployerTest.java
77 lines (57 loc) · 2.2 KB
/
EmployerTest.java
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import static org.junit.jupiter.api.Assertions.*;
import org.junit.After;
import org.junit.Before;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.jupiter.api.Test;
public class EmployerTest {
@BeforeClass
public static void oneTimeSetup() {
}
@AfterClass
public static void oneTimeTearDown() {
}
@Before
public static void setUp() {
}
@After
public static void tearDown() {
}
@Test
public void testAssociateCompanyNormal() {
Employer emp = new Employer("Joe", "Mon", "[email protected]", "12345678");
CompanyProfile com = new CompanyProfile("Company", "111 1st Drive", "We are a company - go figure");
emp.associateCompany(com);
assertEquals(emp.getCompany(), com);
}
@Test
public void testAssociateCompanyWrongCompany() {
Employer emp = new Employer("Joe", "Mon", "[email protected]", "12345678");
CompanyProfile com = new CompanyProfile("Company", "111 1st Drive", "We are a company - go figure");
CompanyProfile com2 = emp.getCompany();
emp.associateCompany(com);
assertNotEquals(com2, emp.getCompany());
}
@Test
public void testAssociateCompanyNull() {
Employer emp = new Employer("Joe", "Mon", "[email protected]", "12345678");
emp.associateCompany(null);
assertEquals(emp.getCompany(), null);
}
/*@Test
public void testReviewAddNormal() {
Student student = new Student("Jack", "Back", "[email protected]", "123456789", "junior");
Employer emp = new Employer("Joe", "Mon", "[email protected]", "12345678");
Review rev = new Review("Joe", "Mon", 4.0, "A good student");
emp.reviewStudent(4, "A good student", student);
assertEquals(student.getReviews().get(0), rev);
}*/
/*@Test
public void testReviewWithNullValues(){
Student student = new Student("Jack", "Back", "[email protected]", "123456789", "junior");
Employer emp = new Employer("Joe", "Mon", "[email protected]", "12345678");
Review rev = new Review("Joe", "Mon", 0, null);
emp.reviewStudent(0, null, student);
assertEquals(rev, student.getReviews().get(0));
}*/
}