diff --git a/examples/csharp/csharp-booking-01_base/test/Booking.Tests/BookingShould.cs b/examples/csharp/csharp-booking-01_base/test/Booking.Tests/BookingShould.cs index 6b484c12..2ab18704 100644 --- a/examples/csharp/csharp-booking-01_base/test/Booking.Tests/BookingShould.cs +++ b/examples/csharp/csharp-booking-01_base/test/Booking.Tests/BookingShould.cs @@ -13,19 +13,23 @@ private void GetTheCorrectStatusWhenTheBookingHasNotStartedYet() var bookingStartDate = new DateTime(2020, 6, 26, 19, 0, 0); var bookingEndDate = new DateTime(2020, 7, 14, 16, 0, 0); - var booking = new Booking( - new BookingId("2c1e34d0-1430-4307-80bf-a71761f71390"), - bookingStartDate, - bookingEndDate, - new CustomerId("72cf3524-7838-45f3-8179-2e75abe5e81c"), - new CustomerName("Perico Los Palotes"), - new EmailAddress("perico.los.palotes@mail.com"), - BookingType.VACATION, - DiscountType.NONE, - new DiscountValue(0), - TaxType.NONE, - new TaxValue(0) - ); + private Booking CreateBooking(DateTime startDate, DateTime endDate) + { + return new Booking( + new BookingId("2c1e34d0-1430-4307-80bf-a71761f71390"), + startDate, + endDate, + new CustomerId("72cf3524-7838-45f3-8179-2e75abe5e81c"), + new CustomerName("Perico Los Palotes"), + new EmailAddress("perico.los.palotes@mail.com"), + BookingType.VACATION, + DiscountType.NONE, + new DiscountValue(0), + TaxType.NONE, + new TaxValue(0) + ); + } + Assert.Equal(BookingStatus.NOT_STARTED, booking.StatusFor(dateBeforeBookingHasStarted)); }