-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProjectListTest.java
28 lines (25 loc) · 1.29 KB
/
ProjectListTest.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
import org.junit.Test;
import static org.junit.Assert.*;
// Jason Spratt
public class ProjectListTest {
@Test
public void testAddProject() {
ProjectList projectList = new ProjectList();
projectList.addProject("Test Project", "Test Description", "Test Author");
assertEquals("Test Project", projectList.getProjectList().get(4).getProjectName());
assertEquals("Test Author", projectList.getProjectList().get(4).getProjectAuthor());
}
@Test
public void testAddTask() {
ProjectList projectList = new ProjectList();
projectList.addTask("Test Task", "Test Description", 1, Category.BUG, null, false, 1, "red");
assertEquals("Test Task", projectList.geTasksList().get(0).getTaskName());
assertEquals("Test Description", projectList.geTasksList().get(0).getTaskDes());
assertEquals("1", projectList.geTasksList().get(0).getTaskPrio());
assertEquals(Category.BUG, projectList.geTasksList().get(0).getCategory());
assertEquals(null, projectList.geTasksList().get(0).getComments());
assertEquals(false, projectList.geTasksList().get(0).getInProgress());
assertEquals(1, projectList.geTasksList().get(0).getTaskPrivacy());
assertEquals("red", projectList.geTasksList().get(0).getColor());
}
}