-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestStudentSetFaculty.java
More file actions
37 lines (30 loc) · 1.01 KB
/
Copy pathTestStudentSetFaculty.java
File metadata and controls
37 lines (30 loc) · 1.01 KB
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
import org.junit.Test;
import static org.junit.Assert.*;
public class TestStudentSetFaculty {
@Test
public void testRigh() {
int[] marks= {10, 6, 9, 8};
Student s= new Student("Gigel", 20,
marks, EFaculty.CSIE);
s.setFaculty(EFaculty.MK);
assertEquals("testing set of MK", EFaculty.MK, s.getFaculty());
}
@Test
public void testInverseRelationship() {
int[] marks= {10, 6, 9, 8};
Student s= new Student("Gigel", 20,
marks, EFaculty.CSIE);
s.setFaculty(EFaculty.MK);
assertNotEquals("testing if the setter changed the faculty", EFaculty.CSIE, s.getFaculty());
}
@Test
public void testInverseRelationship2() {
int[] marks= {10, 6, 9, 8};
Student s= new Student("Gigel", 20,
marks, EFaculty.CSIE);
s.setFaculty(EFaculty.MK);
assertNotEquals("testing not to be CSIE", EFaculty.CSIE, s.getFaculty());
assertNotEquals("testing not to be CSIE", EFaculty.FAABV, s.getFaculty());
assertNotEquals("testing not to be CSIE", EFaculty.MN, s.getFaculty());
}
}