From 2c9a19c6bd60789a096e19c1068b45a05946b6ca Mon Sep 17 00:00:00 2001 From: nubnubyas Date: Thu, 21 Sep 2023 23:10:30 +0800 Subject: [PATCH] Updated Text Ui Testing --- text-ui-test/EXPECTED.TXT | 16 +++++++++------- text-ui-test/data/duke.txt | Bin 0 -> 515 bytes text-ui-test/input.txt | 6 +++--- text-ui-test/runtest.bat | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 text-ui-test/data/duke.txt diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 7541d0bb6b..90f19a318e 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -9,12 +9,12 @@ Now you have 1 tasks in the list. ____________________________________________________________ ____________________________________________________________ Got it. I've added this task: - [D][ ] return book (by: June 6th) + [D][ ] return book (by: 06-06-2023 19:00) Now you have 2 tasks in the list. ____________________________________________________________ ____________________________________________________________ Got it. I've added this task: - [E][ ] project meeting (from: Aug 6th 2pm to: 4pm) + [E][ ] project meeting (from: 06-06-2023 19:00 to: 06-06-2023 21:00) Now you have 3 tasks in the list. ____________________________________________________________ ____________________________________________________________ @@ -33,9 +33,10 @@ ____________________________________________________________ ____________________________________________________________ Here are the tasks in your list: 1.[T][X] read book -2.[D][ ] return book (by: June 6th) -3.[E][ ] project meeting (from: Aug 6th 2pm to: 4pm) +2.[D][ ] return book (by: 06-06-2023 19:00) +3.[E][ ] project meeting (from: 06-06-2023 19:00 to: 06-06-2023 21:00) 4.[T][X] join sports club + ____________________________________________________________ ____________________________________________________________ Got it. I've added this task: @@ -44,15 +45,16 @@ Now you have 5 tasks in the list. ____________________________________________________________ ____________________________________________________________ Got it. I've added this task: - [D][ ] return book (by: Sunday) + [D][ ] return book (by: 06-06-2023 19:00) Now you have 6 tasks in the list. ____________________________________________________________ ____________________________________________________________ Nice! I've marked this task as done: -[D][X] return book (by: June 6th) +[D][X] return book (by: 06-06-2023 19:00) ____________________________________________________________ ____________________________________________________________ -Argument Error: No enum constant Monday.Command.BLAH +Sorry, I do not understand what that means. +Please provide a valid input/command. e.g todo read book ____________________________________________________________ ____________________________________________________________ Bye. Hope to see you again soon! diff --git a/text-ui-test/data/duke.txt b/text-ui-test/data/duke.txt new file mode 100644 index 0000000000000000000000000000000000000000..8de23a94ba54625754b3fb2043c5e4581346e4b0 GIT binary patch literal 515 zcmZ8dJ4*vW5T0C~62(`VAVLrHo5GcyOU%iA_$6=l?V#@ z4+O!|KOl&eVr?l%(pigpiAqc}F!RlPkGbhVR7sevkruI=$UJ*RO44zdLVfr=fB8VJ z!w_1Bh+=zG`v4GYM}lgOrW%5~q+=sdb-N_;;`ZhE^)yYFEdV_Vo1I7DeLb!1zgb{y zLyW1s;M9SnOI1ZOADQ3?Gfvk(ef7Ev-@&1pY`FeWK+Gi4#_MmRMroHu~SIK60` z#CuCuXBLDUNVq>!g!F(BS%YRBQ6XNQAT60Lr+481!iGF4DK;hlrJv|OBRH^&RG#k~ z-Onu)?#4|hznzEz#NT7Ft~NfVhkdNJD96;+#%A|(v0x%P5T@J>BodDKF%pUWW}pfP zlfD!+TER?%QZzwT04M(xKJ>`INCq30F+5chjAxWDB&tlsYnBIyAx)Nrl%hR|60FCA M;c&kHDqXF=0c!1};s5{u literal 0 HcmV?d00001 diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index 0fe4c35581..47e67de657 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -1,12 +1,12 @@ todo read book -deadline return book /by June 6th -event project meeting /from Aug 6th 2pm /to 4pm +deadline return book /by 2023-06-06 19:00 +event project meeting /from 2023-06-06 19:00 /to 2023-06-06 21:00 todo join sports club mark 1 mark 4 list todo borrow book -deadline return book /by Sunday +deadline return book /by 2023-06-06 19:00 mark 2 blah bye \ No newline at end of file diff --git a/text-ui-test/runtest.bat b/text-ui-test/runtest.bat index ad32519568..7e5204e26b 100644 --- a/text-ui-test/runtest.bat +++ b/text-ui-test/runtest.bat @@ -7,7 +7,7 @@ REM delete output from previous run if exist ACTUAL.TXT del ACTUAL.TXT REM compile the code into the bin folder -javac -cp ..\src\main\java -Xlint:none -d ..\bin ..\src\main\java\*.java +javac -cp ..\src\main\java -Xlint:none -d ..\bin ..\src\main\java\monday\Monday.java IF ERRORLEVEL 1 ( echo ********** BUILD FAILURE ********** exit /b 1 @@ -15,7 +15,7 @@ IF ERRORLEVEL 1 ( REM no error here, errorlevel == 0 REM run the program, feed commands from input.txt file and redirect the output to the ACTUAL.TXT -java -classpath ..\bin Monday < input.txt > ACTUAL.TXT +java -classpath ..\bin monday.Monday < input.txt > ACTUAL.TXT REM compare the output to the expected output FC ACTUAL.TXT EXPECTED.TXT