Ejemplo n.º 1
0
        protected void ThenCreateSessionOnlineBooking(ApiResponse response,
                                                      ExpectedStandaloneSession session,
                                                      ExpectedCustomer customer,
                                                      SetupData setup,
                                                      int expectedBookingCount = 1)
        {
            var booking = AssertSuccessResponse <SingleSessionBookingData>(response);

            AssertCreateSingleSessionOnlineBooking(booking, session, customer);
            var bookingId = booking.id;

            var sessionResponse = AuthenticatedGet <SessionData>("Sessions", booking.session.id, setup);
            var sessionData     = AssertSuccessResponse <SessionData>(sessionResponse);

            Assert.That(sessionData.booking.bookings.Count, Is.EqualTo(expectedBookingCount));
            var bookingOne = sessionData.booking.bookings[expectedBookingCount - 1];

            AssertCustomerBooking(bookingOne, bookingId, customer);
        }
 private string CreateSessionSaveCommandJson(ExpectedStandaloneSession session)
 {
     return(JsonSerialiser.Serialise(CreateSessionSaveCommand(session)));
 }
Ejemplo n.º 3
0
 protected void AssertCreateSingleSessionOnlineBooking(SingleSessionBookingData booking,
                                                       ExpectedStandaloneSession session,
                                                       ExpectedCustomer customer)
 {
     AssertCreateSingleSessionBookingData(booking, session, customer, Constants.PAYMENT_STATUS_PENDING_PAYMENT);
 }