View on GitHub

tp

ATAS (Amazing Task and Assignment System) Developer Guide

By: Team M16-1 Since: Jan 2020 License: MIT

Table of Contents

  1. Setting up
  2. Design
  3. Implementation
  4. Testing
  5. DevOps
  6. Appendices

1. Setting up

This section will guide you on how to set up this project on your own computer.

1.1. Prerequisites

  1. JDK 11 or above

  2. IntelliJ IDE

1.2. Setting up the project

  1. Fork this repository, and clone the fork to your computer

  2. Open the IntelliJ IDE. If you are not in the welcome screen, click File > Close Project to close the existing project.

  3. Set up the correct JDK version for Gradle

    1. Click Configure > Project Defaults > Project Structure

    2. Click New... and find the directory of the JDK

  4. Click on Import Project

  5. Locate and select the build.gradle file, then click OK

  6. Click Open as Project

  7. Click OK to use the default settings provided

1.3. Verifying the Setup

  1. In an IntelliJ terminal, run gradlew build

  2. Move to the folder build > libs and run: java -jar atas-2.0.0.jar

    1. To use ATAS, type a valid command into the terminal and press the enter key to run the command.
      e.g. Typing help and pressing the enter key will show the available commands

    2. Some example commands you can try to get familiar with ATAS:

      • help: Lists the commands that ATAS supports.

      • assignment n/Assignment One m/CS2113T d/01/02/20 1600 c/Important Assignment: Adds an assignment called Assignment One for the module CS2113T. This assignment is due on 1st February 2020 4pm and the comments for this assignment is that it is an Important Assignment.

      • exit: Exits ATAS.

2. Design

This section will give a high-level overview of how various components in ATAS function and interact with each other.

2.1. Architecture

overall_architecture

The architecture diagram above illustrates the high-level design of the ATAS application.

The Atas component contains all the other components in the application.

The following sections will explain each component in greater detail.

2.2. UI Component

  1. The Ui component reads user input which represents a command.

  2. The Ui component shows the result of the command to the user.

2.3. Logic Component

The Logic component comprises the Parser, Command, and CommandResult classes:

  1. Parser will interpret the user command and return the corresponding Command object.

  2. Command#execute() is called to run the command, returning a CommandResult object.

  3. The CommandResult object will contain the output to be shown to the user.

2.4. Model Component

The Model component contains the Task and TaskList classes, which store the user’s schedule.

TaskList and Tasks

2.5. Storage Component

Storage Class Diagram

  1. A Storage object is created by the Atas class to handle the loading and saving of Task data.

  2. The load() method is used to read saved data from a local file into the current session of ATAS.

  3. The save() method writes the current state of ATAS into the local save file using the Task#encodeTask() method.

2.6. Atas Component

The Atas component integrates all the aforementioned components to run the overall application logic.
The sequence diagram below shows how various components, broken down into the various classes, interact when the user enters a help command

Component interactions for help command

  1. The Ui class is used to read user input.

  2. The Parser class is used to parse the user input string, returning a Command object.

  3. The Command#execute() method is run, returning a CommandResult object.

  4. The Ui class is used to show the CommandResult message to the user.

  5. The Storage object is used to save the new state of the application.

3. Implementation

This section will detail how some noteworthy features are implemented.

Note:
You will need to create tasks to use the features mentioned below.
Create an assignment: assignment n/[NAME] m/[MODULE] d/[DATE] [TIME] c/[COMMENTS]
Create an event : event n/[NAME] l/[LOCATION] d/[DATE] [START_TIME] - [END_TIME] c/[COMMENTS]
Dates follow the DD/MM/YY format, and times follow the HHmm format.
For more information, please refer to the user guide.

3.1. Delete Task Feature

3.1.1 Current Implementation

The DeleteCommand extends the Command class and initializes the delete index in its constructor. The delete index specifies the index of task that the user wants to delete.

Given below is an example usage and how the DeleteCommand mechanism behaves at each step:

Step 1
The user launches the app and retrieves the tasks which are saved under a local file using Storage.

Step 2
The user enters delete 1 into the command line. Method Parser#parseCommand() will be called to parse the command provided. It will obtain information to get delete index.

Warning:
If IndexOutOfBoundsException or NumberFormatException is caught, a new instance of IncorrectCommand class will be called to print the respective error messages

Step 3
A new instance of DeleteCommand with delete index initialized will be created. The DeleteCommand#execute() will be called.

Step 4
The DeleteCommand#execute() method will do 2 things:

The following sequence diagram summarizes how delete command operation works:

delete task

3.1.2. Design Considerations

3.2. Search task feature

3.2.1 Current Implementation

The search task feature is currently implemented in SearchCommand class that inherits from the Command class.

Given below is an example usage of the search command:

Step 1
The user launches the app and retrieves the tasks that are saved under a local file using Storage.

Step 2
The user enters the input into the command line. Method Parser#parseCommand() will be called to parse the command provided to obtain the taskType, searchParam and date .

Step 3
A new instance of SearchCommand with the taskType, searchParam and date will be created.

Step 4
The ArrayList containing the results from Step 3 will be parsed into SearchCommand#SearchList() to format the results into a String suitable for printing out to the users.

Step 5
The String results from Step 5 will be parsed into SearchCommand#resultsList() to print out the results.

The following sequence diagram summarizes how the search and searchd command works :

search operations

3.2.2. Design Considerations:

3.3. Clear Task feature

3.3.1. Current Implementation

The ClearCommand inherits from the Command class and initializes the clearParam to check which clear function has to be executed

Example 1: Given below is an example usage of the clear all command:

Step 1
The user launches the app and retrieves the tasks which are saved under a local file using Storage.

Step 2
The user enters clear all into the command line. Method Parser#parseCommand() will be called to parse the command provided.

Step 3
A new instance of ClearCommand with clearParam initialized will be created. The execute() method of DeleteCommand will then be called.

Step 4
The execute() method will then call the ClearCommand#clearAll().

Example 2: Given below is an example usage of clear done command:

Step 1
The user launches the app and retrieves the tasks which are saved under a local file using Storage.

Step 2
The user enters clear done into the command line. Method Parser#parseCommand() will be called to parse the command provided.

Step 3
A new instance of ClearCommand with clearParam initialized will be created. The DeleteCommand#execute() will then be called.

Step 4
The execute() method will then call the ClearCommand#clearDone() :

The following sequence diagram summarizes how the ClearCommand operation works:

clear command

3.3.2. Design Considerations

3.4. Repeat event feature

This feature allow users to repeat their events at a specified frequency forever, removing the need to insert the same event multiple times with different dates.

3.4.1. Current Implementation

The RepeatCommand class extends the Command class and either allows the stated event to repeat or to stop repeating. To allow an event to repeat, it will replace the current Event object with a RepeatEvent object (RepeatEvent inherits from Event). Likewise, to stop repeating, it replaces the current RepeatEvent with a Event object. A detailed explanation and the difference between the 2 classes will be elaborated later.

Given below is an example usage of the repeat id/2 p/1w command given by a user.

Step 1
Parser#parseCommand() will be called to parse the command provided. Through this method, we will be able to obtain information to get integers eventID, numOfPeriod and string typeOfPeriod.

Note: Available typeOfPeriod: Day d, Week w, Month m, Year y

Step 2
After parsing, a new instance of RepeatCommand with eventID, numOfPeriod and typeOfPeriod initialized will be created. RepeatCommand#execute() will then be called.

Step 3
The execute() method will check 3 things after it calls getTask() method from TaskList class to get the user input task.

Step 4
After the execute() method completes, a new CommandResult class with a string containing the result of the execution. This string will be printed by calling Ui#showToUser() Then the event will be saved into local file by calling Atas#trySaveTaskList().

The following sequence diagram summarizes how repeat command operation works, from the parser creating an RepeatCommand till when execute() method called by Atas is returned:

Repeat Command Sequence Diagram

3.4.2. Event and RepeatEvent Differences and their Impact

Note:
Using originalDateAndTime instead of the recorded date and time of the task helps to circumvent a potential bug concerning the last few dates of a month. For example, given 31st Jan 2020, if we add 1 month to it using the LocalDateTime Java API, we will get 29 Feb 2020. Then adding another month, we will get 29 Mar 2020 instead of 31 Mar 2020.

However by using originalDateAndTime, and using periodCounter to keep track of how much time has passed (i.e how many numOfPeriod with type typeOfPeriod has passed), we can accurately and quickly obtain the correct next date and time. In this case, we will obtain 31 Mar 2020 instead of 29 Mar 2020.

3.4.3 How date and time is updated in RepeatEvent#updateEvent()

There are 2 ways an event’s date and time is updated.

  1. When a RepeatCommand is created to convert an Event object to RepeatEvent object in setRepeat() method under Step 3 of RepeatCommand.
  2. When a user starts up ATAS with RepeatEvent object in its TaskList, Atas#updateEventDate() will be called. It will then call updateEvent() for each RepeatEvent objects and its date will be updated if it is in the past.

3.4.4. Design Considerations

3.4.5 Future Enhancements

A list of possible future enhancements and implementations are provided below as ways to further enhance the user’s experience with ATAS.

3.5. Edit Task Feature

3.5.1. Implementation

The EditCommand class extends the Command class by providing functions to edit specific tasks in the list of ATAS.

Given below is an example usage scenario of the edit command.

Step 1
The user types in edit 1. The parseCommand() method of the Parser class is called to obtain edit which is the type of command the user is entering.

Warning: An IncorrectCommand class will be returned and an UNKNOWN_COMMAND_ERROR string from the Messages class will be passed into the constructor of that class if the command supplied was invalid.

Step 2
The parseCommand() method subsequently calls the prepareEditCommand() method inside the same Parser class. This method splits the fullCommand string parameters into 2 tokens. The integer 1 will be obtained as the Index of the task specified in the list. This method returns a new instance of the EditCommand class, passing the integer 1 as the parameter.

Warning:
An IncorrectCommand class will be returned and a NUM_FORMAT_ERROR string from the Messages class will be passed into the constructor of that class if the number supplied was not an integer.
An IncorrectCommand class will be returned and a INCORRECT_ARGUMENT_ERROR string from the Messages class will be passed into the constructor of that class if there are no task index supplied by the user.

Step 3
A new instance of the EditCommand class is returned to the main method of ATAS with parameter 1 as described above. The execute() method of the EditCommand class is now called.

Step 4
The execute() method in the EditCommand class first gets an input from the user on the details of the edited task.

Tip:
Assignment Command Format: assignment n/[NAME] m/[MODULE] d/DD/MM/YY HHmm c/[COMMENTS]
Event Command Format: event n/[NAME] l/[LOCATION] d/DD/MM/YY HHmm - HHmm c/[COMMENTS]

Step 5
If the user supplies an assignment command, the editAssignment() method will be invoked. This method extracts the assignmentName, moduleName, dateTime and comments string to return a new instance of the Assignment class.

If the user supplies an event command, the editEvent() method will be invoked. This method extracts the eventName, location, startDateTime, endDateTime and comments string to return a new instance of the Event class.

Afterwards, the task will be checked to see whether it is a RepeatEvent task type. If it is not, it will proceed to Step 6.

If it is a RepeatEvent task, the edited task as well as the task to be edited is passed to a editRepeatEvent method to edit the repeated task. In the editRepeatEvent method, the numOfPeriod, typeOfPeriod, originalDateAndTime and periodCounter will be extracted to be passed into creating a new RepeatEvent task.

Step 6
This newly instanced class (either Assignment or Event) will be passed into the method editTask() of the TaskList class. The editTask() method of the TaskList class uses Java’s ArrayList#set() method to replace the task.

Step 7
Finally, a CommandResult class is returned with EDIT_SUCCESS_MESSAGE passed as the parameter to the constructor of that class.

The following sequence diagram summarises what happens when the EditCommand class is executed.

EditCommand_SequenceDiagram.png

The following sequence diagram shows the checking of RepeatEvent task type.

EditCommand_Ref.png

3.5.2. Design Considerations

3.5.3 Future Enhancements

3.6. View Calendar feature

Sample output of Calendar Command

3.6.1. Implementation

The CalendarCommand class extends the Command class with methods to implement the necessary pre-processing to display an overview of tasks in the given date. The following sequence diagram outlines an example execution of CalendarCommand when it is called and the interaction it has with the relevant components.

Interaction of CalendarCommand and the various major components

In particular, the diagram below shows the sequence that buildMonthCalendar() method of the CalendarCommand takes.

Explicit execution flow of CalendarCommand

Given below is an example usage of the calendar command. The step by step execution is shown in the sequence diagram above.

Step 1
The users enters the command calendar d/05/20. This is captured by the Ui component and is subsequently parsed by the Parser component that the main component calls.

Note:
The arguments specified after the command word calendar represents the month and year of the calendar view returned. d/05/20 refers to May 2020.

Step 2
The Parser will construct a CalendarCommand object with the LocalDate provided by the user input.

Note:

To reduce confusion, the LocalDate object created has its day hardcoded to 1, and is implemented by appending 01 to front of [MM/YY].

Note:
An IncorrectCommand object will be constructed with its specific error message instead according to the error encountered. This can be in the form of no arguments provided or parser fails to parse the date provided.

Step 3
The execute() method in the CalendarCommand is then called by the Atas class.

The method manages all pre-processing to get the details needed to formulate the calendar. Details include details of tasks that fall within the given month, and the details of the month itself. The pre-processing work is listed in sequential order below:

Note:
Since an Event can be set to repeat, but is stored within the TaskList as a single Task object, duplicating a repeat Event allows us to obtain the full list of Tasks that might occur within the month as separate Task. The decision is further explained in the design considerations subsection.

Step 4
The CommandResult object is subsequently passed to Ui component which obtains and prints the Calendar view by calling showToUser() method of the Ui component.

3.6.2. Design Considerations

3.6.3. Future Enhancements

3.7. Storage

3.7.1. Implementation

The Storage class uses the encode() and decode() method of each Task subclass to save and load Task data in a file on the user’s computer.
Every time a Command is executed, the Storage#save() method is run to update the save file.

3.7.2. Saving the current state of ATAS with Storage#save():

Step 1
For each Task in the TaskList, Task#encode() is called, and the result is appended to a save string. Each encoded Task is separated by a newline.

Step 2
The save string is written into the specified save file, which will be created if it does not already exist.

3.7.3. Loading previously saved TaskList data into ATAS with Storage#load():

Step 1
Read each line from the save file one by one. Each line corresponds to an encoded Task.

Step 2
For each line, determine its Task type, and call the static decode() method from the corresponding class.

Step 3
Add each decoded Task into a TaskList.

Step 4
When all lines in the save file have been decoded, return the TaskList.

3.7.4. Design Considerations

4. Testing

Testing is required to ensure that the code written is accurate, bug free (at least in the tests designed) and do not cause any existing feature to fail. For ATAS, there are 2 ways to run automated testing.

4.1. Using IntelliJ JUnit Tests

4.2. Using Input-Output Tests

5. DevOps

5.1 Build Automation

We use Gradle for tasks related to build automation, such as running tests, and checking code for style compliance.
To run all build-related tasks:

  1. Open a terminal in the project’s root directory
  2. Run the command:
    • Windows: gradlew build
    • Mac/Linux: ./gradlew build
  3. A message stating BUILD SUCCESSFUL will be shown in the terminal if all tasks were run successfully.
  4. Otherwise, use the error report provided to resolve the issue before trying again.

5.2 Continuous Integration

We use Github Actions for continuous integration. No setup will be required for users who fork from the main ATAS repository.

5.3 Coverage Reporting

We use the IntelliJ IDEA’s coverage analysis tool for coverage reporting. A tutorial on how to install and use this tool can be found here.

5.4 Making a Release

To make a new release:

  1. Update the shadowJar archiveVersion in the build.gradle file
  2. Generate the JAR file using Gradle by opening a terminal in the project’s root directory, and run the command:
    • Windows: gradlew clean shadowJar
    • Mac/Linux: ./gradlew clean shadowJar
  3. Find the JAR file in the build/libs directory.
  4. Tag the repository with the new version number (e.g. v2.1).
  5. Create a new release using Github and upload the JAR file found in step 3.

6. Appendices

6.1. Appendix A: Product Scope

Target user profile:

Value proposition: manage tasks faster and with greater efficiency than a typical GUI based task manager application

6.2. Appendix B: User Stories

S/N

Version

As a …

I can…

So that I …

01

V1.0

User

Add assignments, including assignment details

Can keep track of assignment details

02

V1.0

User

Add events, including event details

Can keep track of event details

03

V1.0

User

Have a daily view of tasks

Can see what is important for today only

04

V1.0

User

Have a weekly view of tasks

Can better plan my time to meet deadlines

05

V1.0

User

List all the tasks

Can have an overview of tasks and mark individual tasks as done or delete specific tasks

06

V1.0

User

View all incomplete assignments

Can know the progress of my work

07

V1.0

User

View all upcoming events

Can see which period of time I will be busy and plan my time accordingly

08

V1.0

User

Mark an assignment as completed

Can easily view which assignments I have yet to complete

09

V1.0

User

Delete tasks

Do not clog up the calendar

10

V1.0

User

Clear all tasks

Can clear all tasks with a single command

11

V1.0

User

Clear all completed tasks

Can remove all completed tasks from the app in a single command

12

V2.0

User

Edit details of assignment

Do not have to delete and create a new assignment instead

13

V2.0

User

Edit details of event

Do not have to delete and create a new event instead

14

V2.0

Long-term User

Have my data persist between sessions

Do not need to close the application when I am not using it

15

V2.0

Frequent User

See the tasks I have for the day when the app starts up

Can quickly check my schedule for the day

16

V2.0

User with many tasks

Search for an event by name

Do not have to scroll through a long list to find its details

17

V2.0

User with many tasks

Search for an assignment by name or module

Do not have to scroll through a long list to find its details

18

V2.0

User with fixed schedule

Set my events as repeated events

Do not have to manually create many events with the same details

19

V2.0

Busy user

Set an ending time for my events

Can see clearly when I am free in my schedule

20

V2.0

User

Set my tasks in calendar view

Can have an easy-to-read, sorted overview of my upcoming tasks

6.3. Appendix C: Non-Functional Requirements

  1. App should work on Windows, Linux, Unix, OS-X operating systems if Java 11 has been installed.

  2. User with above average typing speed for English text (not coding) should be able to utilize the app to manage tasks more efficiently compared to using a mouse.

  3. App should run without any noticeable loss in performance when about 100 tasks are present in the user’s list.

  4. The user interface should be intuitive enough for users who are not IT-savvy but understands the basics of a task managing application.

  5. Data saved in a session should be persistent and carry forward to the next session of use.

  6. Saved data files should be portable across different instance of application on different devices, meaning one can resume a saved session on another device if he so chooses to. Moving from one OS to another does not create any issues either.

  7. Application should not crash, application should always recover from error gracefully with an error message.

  8. Response in the form of command line output should be intuitive, quick and respond specifically to the user’s intent or instructions

  9. Documentation in the form of User Guide and Developer Guide should be clear, concise and understandable to their respective target audience.

  10. Source code are to remain open source such that anyone can make editions to create their own rendition of the application.

  11. Saved data files should not be tampered with by the user unless they understand the methods to make changes. Application should recover from unreadable tampered data files by overwriting the entire file with new session data while old session data is lost.

  12. Application should be scalable to handle increased functionality at any instance.

6.4 Appendix D: Documentation

6.4.1 Introduction

We use MarkDown for writing documentation.

Note:
We choose Markdown over asciidoc, although asciidoc provides more flexibility in formatting because Markdown is easier to master for new developers, and also because it is easier to be deployed on GitHub Pages

6.4.2 Editing documentation

See here to learn the basic syntax for Markdown. To preview your changes to your Markdown documents, you could download the Markdown plugin for IntelliJ, that allows you to preview your changes real-time. Alternatively, you could push the changes to GitHub and view the changes from your commits.

6.4.3 Editing diagrams

See here to learn how to use LucidCharts to draw your own diagrams.

6.4.4. Publishing Documentation

  1. Push the new documents to your own repository on github

  2. Make a pull request to here to request for changes to be made to the documentation. (Click here) to learn how to make a pull request.

  3. The moderators will review your change and make a decision if they want to use your changes

6.4.5. Converting Documentation to PDF format

  1. Click here to find the desired guides that you wish to convert to PDF format.

  2. For Google Chrome users:
    • Go the settings icon and click on print

      Print Image

    • In the print screen, choose the option save as pdf and click save

      Save as PDF

  3. For Windows users:
    • Go the settings icon and click on print

      Print Image

    • In the print screen, choose the option Microsoft Print to PDF and click print

      Save as PDF

6.5 Appendix E: Instructions for Manual Testing

6.5.1 Launch and Shutdown

Launch ATAS

Test Case: java -jar atas-2.0.0.jar

Expected Output: ATAS startup screen is displayed

Exit ATAS

Test Case: exit

Expected Output: ATAS program terminates

6.5.2 Adding assignment task type

Prerequisites: Issue list command, there are no tasks in the list

Test Case 1: assignment n/assignment one m/cs2113 d/01/05/20 1200 c/No comments

Expected Output: A success message of adding the assignment task will be shown. Entering a list command will show 1 task in the list.

Test Case 2: assignment n/assignment one m/cs2113 d/01/05/20 1200 c/No comments after running the assignment command as stated above

Expected Output: An error message indicating that task already exist will be shown. Issuing a list command will only show 1 assignment task in the list.

Test Case 3: assignment n/assignment two

Expected Output: An error message indicating that a wrong format of assignment command is issued. list command will not show assignment two on the list.

Test Case 4: assignment n/assignment three m/cs2113 d/01/05/20 12:00 c/No comment

Expected Output: An error message indicating a wrong format of assignment command is issued. This is due to : in the time entered.

Test Case 5: assignment n/assignment four m/cs2113 d/40/40/20 1200 c/No comment

Expected Output: An error message indicating a wrong format of date or invalid date is issued. list command will not show assignment four on the list.

Prerequisites: Prepare today’s date in DD/MM/YY format to enter into d/

Test Case 6:

  1. assignment n/assignment three m/cs2113 d/DD/MM/YY 1200 c/No comment
  2. exit
  3. java -jar atas-2.0.0.jar

Expected Output: assignment three will be displayed when ATAS is started.

6.5.3 Adding event task type

Test Case 1: event n/meeting one l/com2 d/01/05/20 1200 - 1400 c/No comment

Expected Output: A success message of adding the event task will be shown. Entering a list command will show the meeting one on the list.

Test Case 2: event n/meeting one l/com2 d/01/05/20 1200 - 1400 c/No comment after running the event command as stated above

Expected Output: An error message indicating that task already exist will be shown. Issuing a list command will not show another meeting one on the list.

Test Case 3: event n/meeting two

Expected Output: An error message indicating that a wrong format of event command is issued. list command will not show meeting two on the list.

Test Case 4: event n/meeting three l/com2 d/01/05/20 12:00-1300 c/none

Expected Output: An error message indicating a wrong format of event command is issued. This is due to : in the time entered.

Test Case 5: event n/meeting three l/com2 d/40/40/20 1200-1300 c/none

Expected Output: An error message indicating a wrong format of date or invalid date is issued. list command will not show meeting three on the list.

Test Case 6: event n/meeting four l/com2 d/01/05/20 1300-1200 c/none

Expected Output: An error message indicating that the end time should come after the start time. list command will not show meeting four on the list.

Prerequisites: Prepare today’s date in DD/MM/YY format to enter into d/

Test Case 7:

  1. event n/meeting four l/com2 d/DD/MM/YY 1200-1300 c/None
  2. exit
  3. java -jar atas-2.0.0.jar

Expected Output: meeting four will be displayed when ATAS is started.

6.5.4 Setting an event task to repeat

Prerequisite:

  1. List of tasks contain both assignment and event tasks
  2. In this test case, event task is listed in index 1 in the list
  3. In this test case, assignment task is listed in index 2 in the list

Note: Index of tasks may vary depending on order of adding task.
[A] represents an assignment task type.
[E] represents an event task type.

Test Case 1: repeat id/1 p/3d

Expected Output: Success message indicating that event message will repeat every 3 days. Issuing a list command will show that event changed to a repeat event task type with [R] to indicate repeat and [3d] to indicate 3 days.

Test Case 2: repeat id/1 p/0

Expected Output: Success message indicating that repeat event will no longer repeat. Issuing a list command will show that repeat event is changed to event task type.

Test Case 3: repeat id/1 p/3a

Expected Output: An error message indicating wrong format of repeat command is entered.

Test Case 4: repeat id/2 p/3d

Expected Output: An error message indicating that chosen task index is an assignment task. repeat command only works for event task types.

Prerequisite: List of task is not more than 10

Test Case 5: repeat id/20 p/3d

Expected Output: An error message indicating the valid range of task index to enter will be displayed.

6.5.5 Listing Tasks

Prerequisite: List is empty

Test Case 1: list

Test Case 2: list incomplete assignments

Test Case 3: list upcoming events

Test Case 4: list today

Test Case 5: list week

Expected Output: A message indicating that no tasks were found on the list.

Prerequisite:

  1. List should contain several assignment, event and repeat event task types
  2. List should contain several assignment, event and repeat event task types occurring on the current date
  3. List should contain several event and repeat event task types that are occurring in the next week
  4. List should contain several assignment task type that are incomplete

Test Case 6: list

Expected Output: All tasks that are entered into ATAS will be shown in the order in which they are entered.

Note: This command lists all tasks on the list

Test Case 7: list today

Expected Output: All tasks that are occurring on current date will be displayed.

Test Case 8: list week

Expected Output: All tasks that are occurring within the current date and one week from current date will be displayed.

Test Case 9: list upcoming events

Expected Output: All event and repeat event task types that are occurring from the current date and time will be displayed.

Test Case 10: list incomplete assignments

Expected Output: All assignment task types that are incomplete will be displayed.

6.5.6 Editing Tasks

Prerequisite:

  1. List should contain several assignment, event and repeat event task types
  2. In this test case, it is assumed that task list has no more than 100 tasks
  3. It is assumed that index 1 contains an assignment task type
  4. It is assumed that index 2 contains an event task type
  5. It is assumed that index 3 contains a repeat event task type

Test Case 1:

  1. edit 1
  2. assignment n/edited assignment one m/cs2113 d/01/05/20 1202 c/No comments

Expected Output: Success message indicating that assignment task is successfully edited is displayed. list command shows the newly edited assignment task.

Test Case 2:

  1. edit 2
  2. event n/edited meeting l/com2 d/01/05/20 1202 - 1402 c/No comment

Expected Output: Success message indicating that event task is successfully edited is displayed. list command shows the newly edited event task.

Note: Any error in entering assignment and event types will result in same error as adding assignment or event task type.

Test Case 3:

  1. edit 3
  2. event n/edited repeat meeting l/com2 d/01/05/20 1200 - 1400 c/No comment

Expected Output: Success message indicating that repeat event task is successfully edited is displayed. list command shows the newly edited repeat event task. Task will retain [R] to indicate that it is still a repeat event task.

Test Case 4: edit 200

Expected Output: An error message indicating the range of valid task numbers.

Test Case 5:

  1. edit 1
  2. event n/editing event as assignment l/com2 d/01/05/20 1200 - 1400 c/No comment

Expected Output: An error message indicating that newly edited task should have the same task type as task selected to be edited.

Test Case 6:

  1. edit 2
  2. assignment n/editing assignment as event one m/cs2113 d/01/05/20 1202 c/No comments

Expected Output: An error message indicating that newly edited task should have the same task type as task selected to be edited.

6.5.7 Marking Task as Done

Prerequisite:

  1. List should contain several assignment, event and repeat event task types
  2. In this test case, it is assumed that task list has no more than 100 tasks

Test Case 1: done 1

Expected Output: A success message indicating the name of task that is marked done will be displayed. Issuing a list command shows that the task marked done will be indicated with [/].

Test Case 2: done 200

Expected Output: An error message indicating the range of valid task numbers.

6.5.8 Deleting Task

Prerequisite:

  1. List should contain several assignment, event and repeat event task types
  2. In this test case, it is assumed that task list has no more than 100 tasks

Test Case 1: delete 1

Expected Output: A success message indicating the name of task that is deleted will be displayed. Issuing a list command shows that the task is deleted.

Test Case 2: delete 200

Expected Output: An error message indicating the range of valid task numbers.

6.5.9 Clearing Task

Prerequisite:

  1. List should contain several assignment, event and repeat event task types
  2. In this test case, it is assumed that task list has no more than 100 tasks
  3. List should contain several assignment, event and repeat event task types that are marked as done

Test Case 1: clear done

Expected Output: A success message indicating that all done tasks are cleared will be displayed. Issuing a list command shows that there are no done tasks in the list. All tasks should have a [x] indicator.

Test Case 2:

  1. Issued after above command
  2. clear done

Expected Output: An error message indicating that there are no done tasks at the moment is displayed.

Test Case 3: clear all

Expected Output: A success message indicating that all tasks are cleared will be displayed. Issuing a list command gives a no task is found error because there are no tasks on the list.

Test Case 4:

  1. Issued after above command
  2. clear all

Expected Output: An error message indicating there are no tasks at the moment is displayed.

6.5.10 Searching for Tasks

Prerequisite:

  1. List should contain several assignment, event and repeat event task types
  2. It is assumed that there is an assignment task type named assignment one in the list
  3. It is assumed that there is an assignment task type scheduled on the 01/05/20 in the list
  4. It is assumed that there is an event task type named meeting one in the list
  5. It is assumed that there is an event task type scheduled on the 01/05/20 in the list

Test Case 1: search t/assignment n/one

Expected Output: Success message showing the searched assignment task type will be displayed.

Test Case 2: search t/event n/one

Expected Output: Success message showing the searched event task type will be displayed.

Note: Search for tasks is case-insensitive.
search t/event n/One is a valid search

Test Case 3: search t/anything n/one

Expected Output: Error message displaying invalid search command format will be displayed.

Test Case 4: search t/assignment n/two

Expected Output: An error message showing that there is no matching task for the search query is shown.

Test Case 4: searchd t/assignment n/one d/01/05/20

Expected Output: Success message showing the searched assignment task type will be displayed.

Test Case 5: searchd t/event n/one d/01/05/20

Expected Output: Success message showing the searched event task type will be displayed.

Test Case 6 : search t/all n/one

Expected Output: Success message showing all the tasks matching the search query will be displayed

Test Case 7 : searchd t/all n/one d/01/05/20

Expected Output: Success message showing all the tasks matching the search query and date will be displayed

Test Case 8: search t/assignment n/one d/02/05/20

Expected Output: An error message showing that there is no matching task for the search query is shown.

6.5.11 Calendar View

Prerequisites:

  1. List should contain several assignment, event and repeat event task types
  2. Assume that list is populated with the above task types in the month of May

Test Case 1: calendar d/05/20

Expected Output: Calendar view of all tasks scheduled in May 2020 will be displayed.

Test Case 2: calendar 05/20

Expected Output: Error message indicating that incorrect calendar command is entered will be displayed.