WatchNext Developer Guide
- WatchNext Developer Guide
- 1. Introduction
- 2. Setting up
- 3. Design
- 4. Implementation
- 5. Documentation
- 6. Testing
- 7. Dev Ops
- Appendix A: Product Scope
- Appendix B: User Stories
- Appendix C: Non-Functional Requirements
- Appendix D: Glossary
- Appendix E: Instructions for manual testing
1. Introduction
1.a Purpose
This guide aims to provide information for you: the developers, testers and future contributors of WatchNext such that you will have an easy reference for understanding the features implemented in WatchNext.
1.b Scope
The guide outlines the architecture and design decisions for the implementation of WatchNext.The intended audience of this document are the developers, testers and future contributors of WatchNext.
2. Setting up
This section will show you the requirements that you need to fulfill in order to quickly start contributing to this project in no time!
2.a Prerequisites
- JDK
11
[NOTE] The
WatchNext.jar
file is compiled using the Java version mentioned above.
- IntelliJ IDEA IDE
[NOTE] IntelliJ has Gradle and JavaFx plugins installed by default. Do not disable them. If you have disabled them, go to
File
>Settings
>Plugins
to re-enable them.
2.b Setting up the project in your computer
Fork this repo, and clone the fork to your computer.
-
Open IntelliJ (if you are not in the welcome screen, click
File
>Close Project
to close the existing project dialog first) -
You should set up the correct JDK version for Gradle
-
Click
Configure
>Project Defaults
>Project Structure
-
Click
New...
and find the directory of the JDK -
Click
Import Project
-
Locate the
build.gradle
file and select it. ClickOK
-
Click
Open as Project
-
Click
OK
to accept the default settings -
Open a console and run the command
gradlew processResources
(Mac/Linux:./gradlew processResources
). It should finish with theBUILD SUCCESSFUL
message. + This will generate all the resources required by the application and tests.
2.c Verifying the setup
-
You can run
Duke
and try a few commands. -
You can also run tests using our instructions for manual testing to explore our features.
2.d Before Writing Code
-
Set up CI (Continuous Integration)
This project comes with a GitHub Actions config files (in.github/workflows
folder). When GitHub detects those files, it will run the CI for your project automatically at each push to the master branch or to any PR. No set up required. -
Learn the design
When you are ready to start coding, we recommend that you get some sense of the overall design by reading about WatchNext’s architecture here.
3. Design
WatchNext was designed drawing from the ideas of the Event-driven architectural style.
The class diagram below describes the relationship between the different components in WatchNext.
The Ui and the Scanner components work together as event emitters. The Ui
class prompts the user for input, and the scanner is ready to receive the input. Should the format of the input be unrecognised or incorrect, the Ui
class guides the user with prompts to rectify the errors.
Events will be passed onto the InputParser
which serves as the dispatcher. The InputParser
uses various string manipulation operations from the StringOperations
class to recognise the intention of the user input. After recognising the command, the input will be parsed, and the command information will be passed onto the various command classes for processing. The InputParser
communicates the events to event consumers which are the command classes in this case.
All available operations will be processed by the classes in the commands package. Every command class, like the AddCommand
class, inherits from the Command
class. Each individual command class is able to contain all the processing required for each command with the inputs passed in during the initiation of each command object.
During runtime, the show related data is all stored in the ShowList
class. The data is accessible and can be modified statically by all the command classes. The ShowList
contains Show
objects which describes the attributes of a show.
Certain commands relating to the monitoring of the amount of time users spend watching shows depend on information from the WatchTime
class. The class tracks the date and time remaining for the users to watch shows for the day. The time limit will be set by the user.
This class diagram shows how the Storage class is setup as an example.
On the initiation of WatchNext, the Storage
object will be initiated and retrieves any user data that has been saved from previous runs. The data is stored in plain text and can be manually edited by advanced users. The data is stored in data/showList.txt
. After the execution of every command, the Storage
object calls upon the save command to automatically update the save data file. The commands relating to saving and loading data can be accessed from the SaveState
interface.
Throughout the lifespan of the program, various errors may occur. The ErrorHandling
class stores the various errors that could occur. The expected errors usually stem from invalid user input or Input Output (IO) errors during file loading. The Ui
class informs the users of the errors detected and suggests actions for rectification.
This shows the flow of the program for one user command input.
4. Implementation
AddCommand
The add
command allows users to add a new show which they are watching to the ShowList
. It is invoked by the
InputParser
class.
Given below is an example of usage scenario of how the add
command behaves at each step.
Step 1
- The user types in
add friends 2 10,10 30
, adding theshow
to theShowlist
. The details added include the title of the show, the number of seasons of the show, the number of episodes in each season(separated by the comma) and the duration of each episode.
The InputParser
class calls the parseInput
method to parse the command.
[NOTE]
ArrayOutOfBoundsException
andNullPointerException
is thrown when the number of arguments entered by the user is incorrect.
Step 2
- The
AddCommand
class calls theAddCommand()
method which then creates a new instance of theShow
class.
Step 3
- The user input is tokenized by the
AddCommand
method into 4 seperate parameters. (Title,Number of seasons,Number of episodes for each season respectively,Duration of an episode)
Step 4
- A new
Show
instance is created with the 4 parameters created in step 3 using the default constructor for show. - The duration of the show is parsed by the utility class
InputParser
.
Step 5
- AddCommand checks the
ShowList
for duplicates. If there are duplicates, the user is prompted if they would like to overwrite the duplicate entry. - The
Show
is added to theShowList
.
Step 6
- The changes will be reflected to the user. Concurrently, the changes will be saved into the showList.txt file.
EditCommand
The edit
command allows the user to change the details of each show that they are watching after they have added the
show. It is self-contained, it includes its own parser and methods which prompts the user to change any parameter they
wish, after the user enters done
, the edit
command replaces the old entry with the updated one.
Given below is an example of usage scenario of how the edit command behaves at each step and a sequence diagram to illustrate the steps in a visual form.
[NOTE]
NullPointerException
will be thrown when show entered by user is not found in the showlist.
The blue bubbles represent the Program portion of the interaction, while the yellow bubbles indicate the user input
Figure 1: Program Flow for Edit Command
Figure 2: Sequence Diagram for Edit Command
Step 1
- The user types in
edit friends
, where the showfriends
already exists in the showlist.
Step 2
- The
processCommand
method is called. TheprocessCommand
method will retrieve the existing show object from the showlist, and make a copy of it. - Then the system will prompt the user to edit the name,season,episodes or the duration (of an episode) respectively.
Step 3
- The process command parses each line of the user input.
- The
EditCommand
class then calls the corresponding method, e.g.editDuration()
to make the corresponding changes to the copy.
Step 4
- The user inputs
done
, and the copy of theShow
object is inserted into theShowList
, replacing the old object.
DeleteCommand
The delete
command takes in 1 parameter, the show to be deleted. Following that, the command proceeds to delete the
Show
from the ShowList
. The delete
command is invoked by the InputParser
Method parseDeleteCommand
.
Given below is an example usage scenario and how the DeleteCommand
Class behaves at each step.
Figure 1: Sequence Diagram for Delete Command
Step 1
- The user types in
delete friends
, assuming that friends has been added by the user beforehand. TheparseInput
method inInputParser
class is called to parse the command.
[NOTE]
Customised
NullPointerException
will be thrown when show entered by user is not found in the show list.
Step 2
- A new instance of the
DeleteCommand
class is called and the command is returned to the main program. Thedelete
method inDeleteCommand
class is called.
Step 3
- The
delete
method retrieves theShow
to be deleted from theShowList
.
Step 4
- The
Show
is deleted from theShowList
.
Step 5
- The changes are reflected back to the user. Concurrently, the changes will be saved to the showList.txt file.
AddReviewCommand
The addreview
command allows users to add a rating and a review for the show for future reference.
The addreview
command takes in 2 parameters, the show which review is to be updated and the review to be updated
to the show. The addreview
command is invoked by the InputParser
method parseAddReviewCommand()
.
Step 1
- The string is tokenised into 3 separate parts, the show name, rating and review.
Step 2
- The corresponding show is retrieved from the show list.
Step 3
- The rating of the show is updated.
Step 4
- The review of the rating is added to the show. If there is an existing review, the new review will overwrite the existing review.
Step 5
- The changes are reflected back to the user. Concurrently, the changes will be saved to the showList.txt file.
ChangeRatingCommand
The changerating
command changes the rating of the desired show.
The changerating
command takes in 2 parameters, the show for which the rating is to be changed and the new rating to be
updated to.
Given below is an example usage scenario and how the ChangeRatingCommand
Class behaves at each step.
Figure 1: Sequence Diagram for ChangeRating Command
Step 1
- The user types in
changerating friends 3
, assuming that friends has been added by the user beforehand. TheparseChangeRatingCommand
method in theInputParser
class is called to parse the command.
[NOTE]
Customised
IndexOutOfBoundsException
will be thrown if user enters a rating with value less than 0 or more than 10.Customised
NullPointerException
will be thrown when the show input by user is not found in the show list.
Step 2
- A new instance of
ChangeRatingCommand
class is created and the command is returned to the main program. ThechangeRating
method inChangeRatingCommand
class is called.
Step 3
- The
changeRating
method starts with retrieving theShow
from theShowList
.
Step 4
- Thereafter, the new rating will be updated to the
Show
.
Step 5
- The
Show
is updated back into theShowList
.
Step 6
- The changes are reflected back to the user. Concurrently, the changes will be saved to the showList.txt file.
DeleteRatingCommand
The deleterating
command deletes the rating of the desired show.
The deleterating
command takes in 1 parameter, the show which rating is to be deleted.Following that, the command
proceeds to delete the rating of the show that was inputted by the user.
Given below is an example usage scenario and how the DeleteCommand
Class behaves at each step.
Figure 1: Sequence Diagram for DeleteRating Command
Step 1
- The user types in
deleterating friends
, assuming that friends has been added by the user beforehand. TheparseDeleteRatingCommand
method inInputParser
class is called to parse the command.
[NOTE]
Customised
NullPointerException
will be thrown when the show input by user is not found in the show list.
Step 2
- A new instance of
DeleteRatingCommand
class is called and the command is returned to the main program. ThedeleteRating
method inDeleteRatingCommand
class is called.
Step 3
- The
deleteRating
method starts with retrieving theShow
from theShowList
Step 4
- The
Show
rating will then be set to -1, essentially deleting it
Step 5
- The
Show
is updated back into theShowList
.
Step 6
The changes are reflected back to the user. At the same time, changes are saved into the showList.txt file.
ChangeReviewCommand
The changereview
command takes in 2 parameters, the show which review is to be changed and the new updated review.
The command is then invoked by the InputParser
method parseChangeReview
.
Step 1
- The user types in
changereview friends / This show is great
, assuming that friends has been added by the user beforehand. TheparseChangeReviewCommand
method inInputParser
class is called to parse the command.
[NOTE]
Customised
NullPointerException
will be thrown when show entered by user is not found in the show list.
Step 2
- A new instance of
ChangeReviewCommand
class is called and the command is returned to the main program. ThechangeReview
method inChangeReviewCommand
class is called.
Step 3
- The
changeReview
method starts with retrieving theShow
from theShowList
.
Step 4
- The
Show
review is then set to “This show is great”, as per the user input.
Step 5
- The
Show
is updated back into theShowList
.
Step 6
- The changes are reflected back to the user. Concurrently, the changes will be saved to the showList.txt file.
DeleteReviewCommand
The deletereview
command takes in 1 parameter, the show which review is to be deleted.
The command is then invoked by the InputParser
method parseDeleteReview
.
Given below is an example usage scenario and how the DeleteCommand
Class behaves at each step.
Step 1
- The user types in
deletereview friends
, assuming that friends has been added by the user beforehand. TheparseInput
method inInputParser
class is called to parse the command.
[NOTE]
Customised
NullPointerException
will be thrown when show entered by user is not found in the show list.
Step 2
- A new instance of
DeleteReviewCommand
class is called and the command is returned to the main program. ThedeleteReview
method inDeleteReviewCommand
class is called.
Step 3
- The
deleteReview
method starts with retrieving theShow
from theShowList
.
Step 4
- The
Show
review is then set to “null”, essentially deleting it.
Step 5
- The
Show
is updated back into theShowList
.
Step 6
The changes are reflected back to the user. Concurrently, the changes will be saved to the showList.txt file.
WatchCommand
The WatchCommand
class extends Command
by providing methods to
increment the current episode in the persistent watch history of the user. It also updates the watch time limit as indicated previously by the user.
Given below is an example usage scenario and how the WatchCommand
class behaves at each step.
Step 1
- The user types in
watch friends
, assuming that friends has been added by the user beforehand. TheparseInput
method inInputParser
class is called to parse the command.
[NOTE] Customised
IndexOutOfBoundsException
andNullPointerException
will be thrown if the user enters invalid commands.
Step 2
- A new instance of
WatchCommand
class is called and the command is returned to the main program. TheprocessCommand
method inWatchCommand
class is called.
Step 3
- The
processCommand
method inWatchCommand
class is then called. This method does three main things:
1.Check the status of user’s watch progress: In middle of series , finished season and finished series.
2.Increment current episode and new season if applicable. No change is done if user has finished series.
3.Reflect the new changes to the user. A prompt is made to the user if the user has already finished the series. Changes are also saved in the userData.txt
file.
The following sequence diagram summarises what happens when a user executes a WatchCommand
:
Sequence diagram for Watch Command
UpdateShowEpisodeProgressCommand
The UpdateShowEpisodeProgressCommand
class extends Command
by providing methods to change
the current episode in the persistent watch history of the user.
Step 1
- User types in
updatesshowepisodeprogress friends 5
- When the
InputParser
identifies the command, a new instance of theUpdateShowEpisodeProgressCommand
will be created.
Step 2
processCommand()
is called and thecurrentEpisode
field of the specified show is updated via thesetEpisodeWatched()
command.
UpdateShowSeasonCommand
The UpdateShowSeasonCommand
class extends Command
by providing methods to change
the current season in the persistent watch history of the user.
Step 1
- User types in
updatesshowseason friends 2
- When the
InputParser
identifies the command, a new instance of theUpdateShowSeasonCommand
will be created.
Step 2
processCommand()
is called.
Step 3
-
If only
currentSeason
is to be updated:-
updateSeasonOnly()
method is called. -
currentSeason
field of the specified show is updated via thesetCurentSeason()
command.
-
-
If both
currentSeason
andcurrentEpisode
are to be updated:-
updateSeasonAndEpisode()
method is called. -
currentSeason
field of the specified show is updated via thesetCurentSeason()
command, and thecurrentEpisode
field of the specified show is updated via thesetEpisodeWatched()
command.
-
UpdateTimeLimitCommand
The UpdateTimeLimit
class extends Command
by providing methods to
update the current time limit of the user from the WatchTime
class.
Given below is an example usage scenario and how the UpdateTimeLimit
class behaves at each step.
Step 1
- The user types in
updatetimelimit 120
. TheparseInput
method inInputParser
class is called to parse the command.
[NOTE] Customised
IndexOutOfBoundsException
andNullPointerException
will be thrown if the user enters invalid commands.
Step 2
- A new instance of
UpdateTimeLimit
class is called and the command is returned to the main program. TheprocessCommand
method inUpdateTimeLimit
class is called.
Step 3
-
The
processCommand
method inUpdateTimeLimit
class will call theWatchTime
class and update itsdailywatchtime
variable to the desired value, which is 120 in this case. -
The change will then be reflected to the user, and saved to the
userData.txt
file.
Storage
The Storage class is created and facilitated by Duke
. It has an interface class SaveState
. It implements the following operations:
saveState()
—- Save the show list and the watch time details into a file nameduserData.txt
loadWatchTimeDetail()
—- load the watch time detail fromuserdata.txt
and create aWatchTime
instanceloadState()
—- load the show list and watch time detail fromuserdata.txt
and return aShowList
instance
Step 1
- The user starts up WatchNext.
Duke
creates aStorage
class and specifies the file path ofuserData.txt
.
Step 2
Duke
callsloadState()
to load contains into WatchNext.loadState()
first callsloadWatchTimeDetail()
to load watch time details and then load show list.
[NOTE]
-
If the
data
folder anduserData.txt
do not exist,loadState()
will create them under the same file path as the WatchNext.jar. -
If
Duke
catches any exception, an emptyShowList
andWatchTime
will be created.
Step 3
- Every time the user inputs a command,
Duke
callssaveState()
to save the current show list and watch time details intouserData.txt
.
[NOTE]
- The whole
userData.txt
will be rewrite to ensure that all changes are recorded.
Step 4
- The user inputs
bye
. The WatchNext program will terminate, anduserData.txt
is saved.
The following sequence diagram shows the working flow of Storage
class.
ErrorHandling
The ErrorHandling
class extends Exception
by providing the appropriate exception error message to the user when the program encounters an exception.
The following is an example execution scenario and demonstrates how the ErrorHandling
class behaves and interacts with other relevant classes.
Step 1
- The user types in
updatetimelimit hello
. TheparseInput
method inInputParser
class is called to parse the command. TheprocessCommand
method inUpdateTimeLimit
class is called. TheprocessCommand
method will attempt to parsehello
to an integer.
[NOTE] At this instance
NumberFormatException
will be thrown ashello
cannot be parsed to an integer.
Step 2
- The
parseUpdateTimeLimitCommand
method inInputParser
class catches the thrownNumberFormatException
. TheprintInvalidFormatException
method inUi
class is called.
Step 3
- The
printInvalidFormatException
method inUi
class will call theErrorHandling
class and get theEXCEPTION_INVALID_FORMAT
enumeration, along with itsexceptionMessage
. TheUi
class prints theexceptionMessage
into the terminal.
InputParser
-
The InputParser reads in the user input, matches the user input with any possible command and invokes the command on the user’s behalf.
-
It detects any illegal inputs and throws the relevant exceptions.
TimeParser
-
The TimeParser class handles all functionality related to reading in the users’ time input.
-
It takes input in two different formats
<A>h<B>m
<C>
-
Format 1 is in hours and minutes, while format 2 is in minutes only. The <> represent user input.
-
The TimeParser will return -1 if the time input has any negative numbers, or if the number of hours exceed 24 or minutes exceed 59.
5. Documentation
This project comes with 2 pieces of documentation, the developers’ guide, which you are reading right now and the user guide, which helps new users get acquainted with the program.
Throughout the code JavaDocs was used to explain the individual classes and functions.
6. Testing
We have written J-Unit test for the main functionalities for the program, such as command
classes. The test can be found under /src/test
.
When using gradle to build the project, these tests are run automatically and will catch any runtime errors. If you have added new functionality, please remember to add a J-Unit test for the new functionality.
Two main forms of testing was used for the development of WatchNext.
- Text-ui-test
- This seeks to test the general flow of the program and simulates the “expected” or “smooth” lifespan of the program.
- This is useful to ensure that the changes to one class does not inadvertently affect the operation of another. Any changes to the operation of another class will show through this test and can be rectified by the developer.
- Text-ui-test is also a good final litmus test on the smooth running of the program before it is released to production.
- J-unit
- The test mainly focuses on the correctness of each individual class.
- This tests the functions within each class and ensures that it behaves as expected by testing the output of each function against what is expected.
- The benefits include ensuring that the coupling between the classes do not cause any unexpected behaviour when another class has been modified.
- The errors thrown from the J-unit tests allow the developer to zoom in on the classes which are not showing the expected behaviour to quickly and effectively rectify the bugs.
7. Dev Ops
After the project is finalised and released, if you find any bugs or problems, or if you have suggestions for new functionality, please create a new issue on our github page.
Appendix A: Product Scope
Target user profile
WatchNext is a program made for teenagers and young adults.For users who use multiple free streaming platforms or other open source stream websites, the application will track their progress in the different shows they watch, and the upcoming shows they wish to watch.In addition, it provides a tracker to limit your daily show progress to help manage your time.
WatchNext is optimized for users who prefer to work with the Command Line Interface (CLI).
Value proposition
There exists many options for streaming all sorts of video content from the giant media service provider company netflix, to other platforms that lean
towards user sourced content.
This poses a new challenge to any tech-savvy person who wants to make sure they do not miss a single episode of their
favourite show. Netflix and other established streaming platforms are able to keep track of the user’s progress, but should be the user use more than one
streaming platform, there is no avenue of communication between the streaming platforms to synchronise this data.
WatchNext seeks to fill in this gap
by providing users with a single streamlined platform to keep track of the episodes of all their favourite shows. They do not need to worry about re-watching
or missing episodes with the help of WatchNext’s show progress tracking features.
WatchNext also helps users track the total time they spend watching shows across all platforms. This provides users with an encompassing view of the
actual time they spend watching shows and is a feature that is not provided by most other platforms.
Appendix B: User Stories
Version | As a … | I want to … | So that I can … |
---|---|---|---|
v2.0 | new user | limit my watching time sometimes | I do not get carried away and watch too many shows in one sitting |
v1.0 | user | be able to share my watch history | I can export and share the shows that I like with my friends. |
v1.0 | show enthusiast | revisit my ratings for shows i have watched | change the rating in the event that i want to. |
v1.0 | show enthusiast | know which current episode i am at | continue watching the show later. |
v1.0 | student | track my watchtime | not miss my deadlines. |
v1.0 | show enthusiast | revisit my ratings for shows i have watched | change the rating in the event that i want to. |
v1.0 | user | clear my watch history | I can protect my privacy. |
v1.0 | student | I want to track which zoom lectures / or webcasts that I have watched | I can make sure I don’t miss any important lessons. |
Appendix C: Non-Functional Requirements
-
WatchNext will work on any mainstream OS as long as it has Java 11 installed.
-
Users who can type fast and prefer typing over other means of input should be able to use WatchNext faster using commands than using the mouse in a GUI(Graphic User Interface)-based program.
Appendix D: Glossary
-
Graphic User Interface - It is a user interface that includes graphical elements, such as windows, icons and buttons.
-
Mainstream OS - Windows, Linux, Unix, OS-X
-
Continuous Integration - A software practice that requires frequently committing code to a shared repository
Appendix E: Instructions for manual testing
[NOTE] The instructions and sample test cases only act as a guide for you to start testing on some of our application features. You are free to test our features with more test cases of your own. Refer to Section 2.a,“Prerequisites” for the instructions to set up our program on your computer.
{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}
Managing shows
Adding a show
-
Test case:
add friends 2 9,10 60
Expected: An acknowledgement message displayed indicating that the show has been added. -
Test case:
add friends
Expected: An error message displayed due to invalid format given by the user. -
Test case:
add friends 2 9,10,11 60
Expected: An error message displayed due to the different number of seasons and episodes for each season given.
Deleting a show
-
Prerequisites: The show name
friends
has already been added into the list. -
Test case:
delete Friends
Expected: An error message indicating that the show was not found.
[NOTE] The show name added is case-sensitive, as mentioned in the User Guide
-
Test case:
delete friends
Expected: An acknowledgement message displayed indicating that the show has been deleted from the list. -
Test case:
delete 1
Expected: An error message indicating that the show was not found.
Editing a show
- Prerequisites: The show name
friends
has already been added into the list. Reach the edit prompt by the program using theedit friends
command.
[NOTE] Refer to our manual testing for adding a show if you need help with the command. The following test cases should be enter after going into the edit prompt.
-
Test case:
season 3
followed byepisode 3,10
Expected: An error message displayed due to the different number of seasons and episodes for each season given. -
Test case:
duration 1h0m
followed bydone
Expected: A message acknowledging the change.Updated show details.
- Test case:
season 3
followed byepisode 10,10,10
followed bydone
Expected: A message acknowledging the change.Updated show details.
Managing Reviews and Ratings
Adding a review
- Prerequisites: The show name
friends
has already been added into the list.
[NOTE] Refer to our manual testing for adding a show if you need help with the command.
-
Test case:
add review friends 8 / Joey is my favourite character
Expected: An acknowledgement messageYour review for friends has been added.
- Test case:
add review friends 8 Chandler is so funny!
Expected: An error message indicating that the format of the command is invalid.
Changing a review
-
Prerequisites: The show name
friends
has already been added into the list. -
Test case:
changereview friends / Chandler is so funny!
Expected: An acknowledgement messageYour review for friends has been changed.
is displayed. -
Test case:
changereview friends I have rewatched friends 5 times
Expected: An error message indicating that the format of the command is invalid.
Changing a rating
-
Prerequisites: The show name
friends
has already been added into the list. -
Test case:
changerating friends 9
Expected: An acknowledgement messageYour rating for friends has been added.
is displayed. -
Test case:
changerating friends abc
Expected: An error message indicating that the rating input is invalid. -
Test case:
changerating
Expected: An error message indicating that the format of the command is invalid.
Deleting a rating
-
Prerequisites: The show name
friends
has already been added into the list. -
Test case:
deleterating friends
Expected: An acknowledgement messageThe rating for friends has been deleted.
is displayed. -
Test case:
deleterating friends abc
Expected: An error message indicating that the format of the command is invalid. -
Test case:
deleterating
Expected: An error message indicating that the format of the command is invalid.
Modifying current watch progress and watch time
Updating current episode
-
Prerequisites: The show name
friends
has already been added into the list. -
Test case:
episode friends 3
Expected: An acknowledgement message that indicates that the current episode has been updated, and watch progress forfriends
is displayed. -
Test case:
episode friends
Expected: An error message indicating that the format of the command is invalid.
Updating current season
-
Prerequisites: The show name
friends
has already been added into the list. -
Test case:
season friends 3
Expected: An acknowledgement message that indicates that the current episode has been updated, and watch progress forfriends
is displayed. -
Test case:
season friends
Expected: An error message indicating that the format of the command is invalid.
Watching a show
-
Prerequisites: The show name
friends
has already been added into the list. -
Test case:
watch friends
Expected: An acknowledgement message that displays the current show progress forfriends
and the updated watch time progress. -
Test case:
watch friends 123
Expected: An error message indicating that the program was unable to find the show that you requested. -
Other incorrect select commands to try:
watch -1
,watch <any show not in the list>
Expected: Similar to previous.
Updating watch time limit
-
Test case:
updatetimelimit 100
Expected: An acknowledgement message that displays the current daily watch time limit now set to 100 minutes. -
Test case:
updatetimelimit -100
Expected: An acknowledgement message that displays the current daily watch time limit, decremented by 100 minutes. -
Test case:
updatetimelimit test
Expected: An error message indicating that the input supplied was in a wrong format.
Viewing show details
Viewing your watch list
-
Test case:
list
Expected: A list of the shows you have added will be displayed into the terminal. If no shows have been added, the list wil be empty. -
Test case:
list a
Expected: An error message indicating that the input supplied was in a wrong format.
Finding a show in your watch list
-
Prerequisites: The show name
friends
has already been added into the list. -
Test case:
search friends
Expected: An acknowledgement message that shows containing the keywordfriends
has been found from the watch list. The details forfriends
is also displayed in the terminal. -
Test case:
search
Expected: An error message indicating that the input supplied was in a wrong format.
- Test case:
search fri
Expected: An acknowledgement message that shows containing the keywordfri
has been found from the watch list. The details forfriends
is also displayed in the terminal.