forked from nus-cs2113-AY2425S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from jinzihan2002/Zihan-9-Oct
Add and delete assignments using AssignmentCommand
- Loading branch information
Showing
27 changed files
with
35 additions
and
17 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...assignment_command/AssignmentCommand.java → .../assignmentcommand/AssignmentCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...endance_command/AddAttendanceCommand.java → ...tendancecommand/AddAttendanceCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...attendance_command/AttendanceCommand.java → .../attendancecommand/AttendanceCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ance_command/DeleteAttendanceCommand.java → ...dancecommand/DeleteAttendanceCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...student_command/DeleteStudentCommand.java → .../studentcommand/DeleteStudentCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...mmand/student_command/StudentCommand.java → ...ommand/studentcommand/StudentCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nd/student_command/addStudentCommand.java → ...and/studentcommand/addStudentCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
src/test/java/tutorlink/command/assignmentcommand/AddAssignmentCommandTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package tutorlink.command.assignmentcommand; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import tutorlink.assignment.Assignment; | ||
|
||
import java.util.ArrayList; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
class AddAssignmentCommandTest { | ||
@Test | ||
void execute_addOne_expectOne() { | ||
// setup | ||
ArrayList<Assignment> assignmentList = new ArrayList<>(); | ||
Assignment assignment1 = new Assignment("Test_1",100,100,0.2); | ||
AddAssignmentCommand addAssignmentCommand = new AddAssignmentCommand(assignment1); | ||
// execute | ||
addAssignmentCommand.execute(assignmentList); | ||
assertFalse(assignmentList.isEmpty()); | ||
assertEquals(1, assignmentList.size()); | ||
assertEquals(assignment1, assignmentList.get(0)); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.