forked from nus-cs2103-AY2324S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
73 additions
and
4 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
4 changes: 4 additions & 0 deletions
4
src/test/java/seedu/address/logic/commands/AddOrderCommandTest.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,4 @@ | ||
package seedu.address.logic.commands; | ||
|
||
public class AddOrderCommandTest { | ||
} |
4 changes: 4 additions & 0 deletions
4
src/test/java/seedu/address/logic/parser/AddOrderCommandParserTest.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,4 @@ | ||
package seedu.address.logic.parser; | ||
|
||
public class AddOrderCommandParserTest { | ||
} |
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,4 @@ | ||
package seedu.address.model.order; | ||
|
||
public class DateTest { | ||
} |
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,4 @@ | ||
package seedu.address.model.order; | ||
|
||
public class OrderTest { | ||
} |
38 changes: 38 additions & 0 deletions
38
src/test/java/seedu/address/storage/JsonAdaptedOrderTest.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,38 @@ | ||
package seedu.address.storage; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertThrows; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import seedu.address.commons.exceptions.IllegalValueException; | ||
import seedu.address.model.order.Date; | ||
import seedu.address.model.order.Order; | ||
|
||
public class JsonAdaptedOrderTest { | ||
private static final Order ORDER = new Order(new Date("2020-01-01"), "100 chicken wings"); | ||
|
||
private static final String VALID_DATE_STRING = "2020-01-01"; | ||
private static final String VALID_DESCRIPTION = "100 chicken wings"; | ||
private static final String VALID_STATUS = "Pending"; | ||
|
||
@Test | ||
public void toModelType_validOrderDetails_returnsOrder() throws IllegalValueException { | ||
JsonAdaptedOrder jsonAdaptedOrder = new JsonAdaptedOrder(VALID_DATE_STRING, VALID_DESCRIPTION, VALID_STATUS); | ||
Order order = jsonAdaptedOrder.toModelType(); | ||
assertEquals(ORDER, order); | ||
} | ||
|
||
@Test | ||
public void toModelType_nullDate_throwsIllegalValueException() { | ||
JsonAdaptedOrder jsonAdaptedOrder = new JsonAdaptedOrder(null, VALID_DESCRIPTION, VALID_STATUS); | ||
System.out.println("jsonAdaptedOrder" + jsonAdaptedOrder); | ||
assertThrows(IllegalValueException.class, jsonAdaptedOrder::toModelType); | ||
} | ||
|
||
@Test | ||
public void toModelType_nullDescription_throwsIllegalValueException() { | ||
JsonAdaptedOrder jsonAdaptedOrder = new JsonAdaptedOrder(VALID_DATE_STRING, null, VALID_STATUS); | ||
assertThrows(IllegalValueException.class, jsonAdaptedOrder::toModelType); | ||
} | ||
} |
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,5 @@ | ||
package seedu.address.testutil; | ||
|
||
public class TypicalOrders { | ||
|
||
} |