-
Notifications
You must be signed in to change notification settings - Fork 24
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
Group 5: Refactoring #22
base: master
Are you sure you want to change the base?
Conversation
@@ -96,7 +96,7 @@ void thenTheBookingShouldBeStopped() throws NoSuchFieldException { | |||
ScheduledFlight scheduledFlight = schedule.searchScheduledFlight(flight.getNumber()); | |||
assertThrows(IllegalStateException.class, () -> customer.createOrder(Arrays.asList("Amanda", "Max"), Arrays.asList(scheduledFlight), 180)); | |||
assertEquals(3, scheduledFlight.getPassengers().size()); | |||
assertEquals(4, scheduledFlight.getCapacity()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after the presentation today, I would prefer the old solution here :)
@@ -30,19 +31,6 @@ public ScheduledFlight(int number, Airport departure, Airport arrival, Identifie | |||
this.currentPrice = currentPrice; | |||
} | |||
|
|||
public int getCrewMemberCapacity() throws NoSuchFieldException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would keep the function but call the method of aircraft
} else if (this.aircraft instanceof Helicopter) { | ||
model = ((Helicopter) this.aircraft).getModel(); | ||
} else if (this.aircraft instanceof PassengerDrone) { | ||
model = "HypaHype"; | ||
} else { | ||
throw new IllegalArgumentException(String.format("Aircraft is not recognized")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be a separate commit
Implementation of class hierarchy for aircrafts and according changes in other classes