Skeleton #1
4
src/main/java/hhn/temp/project/Admin.java
Normal file
4
src/main/java/hhn/temp/project/Admin.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package hhn.temp.project;
|
||||
|
||||
public class Admin extends Worker{
|
||||
}
|
||||
12
src/main/java/hhn/temp/project/AssignmentManager.java
Normal file
12
src/main/java/hhn/temp/project/AssignmentManager.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package hhn.temp.project;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AssignmentManager {
|
||||
List<Worker> workerList;
|
||||
|
||||
public AssignmentManager() {
|
||||
workerList = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package hhn.temp.project;
|
||||
|
||||
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
|
||||
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
|
||||
// to see how IntelliJ IDEA suggests fixing it.
|
||||
System.out.printf("Hello and welcome!");
|
||||
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
//TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
|
||||
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
|
||||
System.out.println("i = " + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
4
src/main/java/hhn/temp/project/Task.java
Normal file
4
src/main/java/hhn/temp/project/Task.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package hhn.temp.project;
|
||||
|
||||
public class Task {
|
||||
}
|
||||
6
src/main/java/hhn/temp/project/TaskState.java
Normal file
6
src/main/java/hhn/temp/project/TaskState.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package hhn.temp.project;
|
||||
|
||||
public enum TaskState {
|
||||
IN_PROGRESS,
|
||||
FINISHED;
|
||||
}
|
||||
4
src/main/java/hhn/temp/project/Worker.java
Normal file
4
src/main/java/hhn/temp/project/Worker.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package hhn.temp.project;
|
||||
|
||||
public class Worker {
|
||||
}
|
||||
@@ -1,12 +1,36 @@
|
||||
package java;
|
||||
|
||||
import hhn.temp.project.AssignmentManager;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Assertions.*;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class BadCasesTest {
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
AssignmentManager manager = new AssignmentManager();
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Assert that added tasks can't be Null")
|
||||
public void assertNewTasksAreNotNull() {
|
||||
|
||||
}
|
||||
@Test
|
||||
@DisplayName("Assert List isn't empty after adding a task")
|
||||
public void assertListNowEmptyAfterAdd() {
|
||||
|
||||
}
|
||||
@Test
|
||||
@DisplayName("Assert only existing tasks can be edited")
|
||||
public void assertEditOnlyExistingTasks() {
|
||||
|
||||
}
|
||||
@Test
|
||||
@DisplayName("Assert Worker can only edit own tasks")
|
||||
public void assertWorkerMayOnlyEditOwnTasks() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,51 @@
|
||||
package java;
|
||||
|
||||
import hhn.temp.project.AssignmentManager;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Assertions.*;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class GoodCasesTest {
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
AssignmentManager manager = new AssignmentManager();
|
||||
}
|
||||
@Test
|
||||
@DisplayName("Assert that a Worker can add a Task")
|
||||
public void assertWorkerCanAddTask() {
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Assert that added Tasks are added to the List")
|
||||
public void assertTasksShowInList() {
|
||||
|
||||
}
|
||||
@Test
|
||||
@DisplayName("Assert existing Tasks can be edited")
|
||||
public void assertExistingTasksCanBeEdited() {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Assert that Worker can remove own Task")
|
||||
public void assertWorkerCanRemoveOwnTask() {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Assert that Admin can remove every Task")
|
||||
public void assertAdminCanRemoveEveryTask() {
|
||||
|
||||
}
|
||||
@Test
|
||||
@DisplayName("Assert deleted Tasks no longer show up in the List")
|
||||
public void assertDeletedTasksDisappear() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user