forked from nus-cs2103-AY2122S1/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 #130 from benluiwj/branch-storageTests
Storage tests
- Loading branch information
Showing
17 changed files
with
437 additions
and
61 deletions.
There are no files selected for viewing
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
13 changes: 13 additions & 0 deletions
13
src/test/data/JsonAddressBookStorageTest/invalidAndValidClientsAddressBook.json
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,13 @@ | ||
{ | ||
"clients": [ { | ||
"name" : "Elle Meyer", | ||
"phoneNumber": "9482224", | ||
"email" : "[email protected]", | ||
"address" : "michegan ave" | ||
},{ | ||
"name": "Hans Muster", | ||
"phone": "9482424", | ||
"email": "invalid@email!3e", | ||
"address": "4th street" | ||
} ] | ||
} |
11 changes: 11 additions & 0 deletions
11
src/test/data/JsonAddressBookStorageTest/invalidAndValidProductsAddressBook.json
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,11 @@ | ||
{ | ||
"products" : [ { | ||
"name": "IPhone 13", | ||
"unitPrice": "1", | ||
"quantity" : "1" | ||
}, { | ||
"name": "IPhone 13", | ||
"unitPrice": "-1", | ||
"quantity" : "1" | ||
} ] | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/data/JsonAddressBookStorageTest/invalidClientsAddressBook.json
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,8 @@ | ||
{ | ||
"clients": [ { | ||
"name": "Hans Muster", | ||
"phone": "9482424", | ||
"email": "invalid@email!3e", | ||
"address": "4th street" | ||
} ] | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/data/JsonAddressBookStorageTest/invalidProductsAddressBook.json
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,8 @@ | ||
{ | ||
"products" : [ | ||
{ | ||
"name": "IPhone 13", | ||
"unitPrice": "-1", | ||
"quantity" : "1" | ||
} ] | ||
} |
13 changes: 13 additions & 0 deletions
13
src/test/data/JsonSerializableAddressBookTest/duplicateClientsAddressBook.json
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,13 @@ | ||
{ | ||
"clients": [ { | ||
"name": "Alice Pauline", | ||
"phoneNumber": "94351253", | ||
"email": "[email protected]", | ||
"address": "123, Jurong West Ave 6, #08-111" | ||
}, { | ||
"name" : "Alice Pauline", | ||
"phoneNumber" : "94351253", | ||
"email" : "[email protected]", | ||
"address" : "123, Jurong West Ave 6, #08-111" | ||
} ] | ||
} |
13 changes: 13 additions & 0 deletions
13
src/test/data/JsonSerializableAddressBookTest/duplicateProductsAddressBook.json
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,13 @@ | ||
{ | ||
"products" : [ | ||
{ | ||
"name": "IPhone 13", | ||
"unitPrice": "1", | ||
"quantity" : "1" | ||
}, { | ||
"name": "IPhone 13", | ||
"unitPrice": "1", | ||
"quantity" : "1" | ||
} | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/data/JsonSerializableAddressBookTest/invalidClientsAddressBook.json
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,8 @@ | ||
{ | ||
"clients": [ { | ||
"name": "Hans Muster", | ||
"phone": "9482424", | ||
"email": "invalid@email!3e", | ||
"address": "4th street" | ||
} ] | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/data/JsonSerializableAddressBookTest/invalidProductsAddressBook.json
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,8 @@ | ||
{ | ||
"products" : [ | ||
{ | ||
"name": "IPhone 13", | ||
"unitPrice": "-1", | ||
"quantity" : "1" | ||
} ] | ||
} |
40 changes: 40 additions & 0 deletions
40
src/test/data/JsonSerializableAddressBookTest/typicalClientsAddressBook.json
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,40 @@ | ||
{ | ||
"clients": [ | ||
{ | ||
"name": "Alice Pauline", | ||
"phoneNumber": "94351253", | ||
"email" : "[email protected]", | ||
"address" : "123, Jurong West Ave 6, #08-111" | ||
}, { | ||
"name": "Benson Meier", | ||
"phoneNumber": "98765432", | ||
"email" : "[email protected]", | ||
"address" : "311, Clementi Ave 2, #02-25" | ||
}, { | ||
"name" : "Carl Kurz", | ||
"phoneNumber": "95352563", | ||
"email" : "[email protected]", | ||
"address" : "wall street" | ||
}, { | ||
"name" : "Daniel Meier", | ||
"phoneNumber": "87652533", | ||
"email" : "[email protected]", | ||
"address" : "10th street" | ||
}, { | ||
"name" : "Elle Meyer", | ||
"phoneNumber": "9482224", | ||
"email" : "[email protected]", | ||
"address" : "michegan ave" | ||
}, { | ||
"name" : "Fiona Kunz", | ||
"phoneNumber": "9482427", | ||
"email" : "[email protected]", | ||
"address" : "little tokyo" | ||
}, { | ||
"name" : "George Best", | ||
"phoneNumber": "9482442", | ||
"email" : "[email protected]", | ||
"address" : "4th street" | ||
} | ||
] | ||
} |
33 changes: 33 additions & 0 deletions
33
src/test/data/JsonSerializableAddressBookTest/typicalProductsAddressBook.json
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,33 @@ | ||
{ | ||
"products" : [ | ||
{ | ||
"name": "IPhone 13", | ||
"unitPrice": "1", | ||
"quantity" : "1" | ||
}, { | ||
"name": "IPad Pro", | ||
"unitPrice": "1", | ||
"quantity" : "5" | ||
}, { | ||
"name": "Air Pods Pro", | ||
"unitPrice": "200", | ||
"quantity" : "20" | ||
}, { | ||
"name": "MacBook Pro", | ||
"unitPrice": "2500", | ||
"quantity" : "15" | ||
}, { | ||
"name": "Mechanical Keyboard", | ||
"unitPrice": "250", | ||
"quantity" : "30" | ||
}, { | ||
"name": "Panadol", | ||
"unitPrice": "8", | ||
"quantity" : "50" | ||
}, { | ||
"name": "Mask", | ||
"unitPrice": "0", | ||
"quantity" : "1000" | ||
} | ||
] | ||
} |
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
Oops, something went wrong.