Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add customer order schedule tests #81

Conversation

qiujiaaa
Copy link

@qiujiaaa qiujiaaa commented Oct 7, 2019

No description provided.

@@ -23,11 +22,7 @@ void isSamePhone() {
assertTrue(IPHONEONE.isSamePhone(IPHONEONE));

// clone -> returns true
try {
assertTrue(IPHONEONE.isSamePhone((Phone) IPHONEONE.clone()));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edited method signature for clone() so there is no need to catch exception anymore, changed it cuz the exception causes further implications in other classes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good choice

&& otherOrder.getPhone().equals(getPhone())
&& otherOrder.getPrice().equals(getPrice())
&& otherOrder.getStatus().equals(getStatus())
&& otherOrder.getSchedule().equals(getSchedule())
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed schedule cuz it might still be null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think can still include schedule. We can use this equals more universally.

@qiujiaaa qiujiaaa added the status.Ongoing The issue is currently being worked on. note: remove this label before closing an issue. label Oct 7, 2019
Copy link

@EugeneTeu EugeneTeu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally ok, good job!

Copy link

@yeodonghan yeodonghan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally well done!

&& otherOrder.getPhone().equals(getPhone())
&& otherOrder.getPrice().equals(getPrice())
&& otherOrder.getStatus().equals(getStatus())
&& otherOrder.getSchedule().equals(getSchedule())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think can still include schedule. We can use this equals more universally.

public class OrderTest {

private static final String VALID_PRICE = "$1021";
private static final Status VALID_STATUS = Status.CANCELLED;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gooood

Copy link

@yan-wl yan-wl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

// invalid contact numbers
assertFalse(ContactNumber.isValidContactNumber("")); // empty string
assertFalse(ContactNumber.isValidContactNumber(" ")); // spaces only
assertFalse(ContactNumber.isValidContactNumber("91")); // less than 3 numbers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think should test for less than 8

@EugeneTeu EugeneTeu merged commit d4b499a into AY1920S1-CS2103T-T09-4:master Oct 8, 2019
@EugeneTeu EugeneTeu modified the milestones: v1.1, v1.2 Oct 9, 2019
@EugeneTeu EugeneTeu removed the status.Ongoing The issue is currently being worked on. note: remove this label before closing an issue. label Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants