Skip to content

Commit

Permalink
Merge pull request #65 from dcsaorg/DT-805
Browse files Browse the repository at this point in the history
DT-805
  • Loading branch information
preetamnpr authored Feb 2, 2024
2 parents f68b81a + e8d32c1 commit 08ac311
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,20 @@ private BookingScenarioListBuilder thenAllPathsFrom(
shipper_GetBooking(CONFIRMED,bookingState)
.thenEither(
noAction().thenHappyPathFrom(CONFIRMED),
uc5_carrier_confirmBookingRequest().thenHappyPathFrom(CONFIRMED),
noAction().thenHappyPathFrom(PENDING_AMENDMENT)
)
);
case AMENDMENT_CANCELLED, AMENDMENT_DECLINED -> then(
shipper_GetBooking(originalBookingState,bookingState)
.thenHappyPathFrom(originalBookingState)
originalBookingState.equals(PENDING_AMENDMENT) ?
shipper_GetBooking(PENDING_AMENDMENT,bookingState).thenEither(
noAction().thenHappyPathFrom(originalBookingState),
uc6_carrier_requestToAmendConfirmedBooking().thenHappyPathFrom(originalBookingState)
):
shipper_GetBooking(CONFIRMED,bookingState).thenEither(
noAction().thenHappyPathFrom(originalBookingState),
uc5_carrier_confirmBookingRequest().thenHappyPathFrom(CONFIRMED)
)
);
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public void confirmBooking(String reference, Supplier<String> cbrGenerator, Stri
}
changeState(BOOKING_STATUS, CONFIRMED);
mutateBookingAndAmendment(this::ensureConfirmedBookingHasCarrierFields);
mutateBookingAndAmendment(b -> b.remove(AMENDED_BOOKING_STATUS));
setReason(reason);
}

Expand Down

0 comments on commit 08ac311

Please sign in to comment.