forked from ConnorMarcus/SYSC4806Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestStudent.java
47 lines (37 loc) · 1.33 KB
/
TestStudent.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
package sysc4806.project.models;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
public class TestStudent {
private Student student;
@BeforeEach
public void setUp() {
student = new Student();
}
@Test
public void testGetAndSetProject() {
Project project = new Project();
student.setProject(project);
assertEquals(student.getProject(), project);
}
@Test
public void testGetAndSetProgram() {
student.setProgram(Program.SOFTWARE_ENGINEERING);
assertEquals(student.getProgram(), Program.SOFTWARE_ENGINEERING);
}
@Test
public void testGetAndSetOralPresentationAvailability() {
PresentationAvailability oralPresentationAvailability = new PresentationAvailability(LocalDateTime.of(2023, 12, 12, 10, 0));
student.addOralPresentationAvailability(oralPresentationAvailability);
assertEquals(student.getOralPresentationAvailability(), List.of(oralPresentationAvailability));
}
@Test
public void testGetAndSetReminder() {
String reminder = "Please join the group";
student.setReminder(reminder);
assertEquals(student.getReminder(), reminder);
}
}