Exemplo n.º 1
0
        public async Task ShouldSelectJourney()
        {
            //Arrange
            var command = new SelectJourneysCommand();

            //Act
            var resource = await _apiTestClient.Post <SelectJourneysCommand, JourneysSelectedResource>("booking/journeys", command);

            //Assert
            resource.ResourceLinks.Should().NotBeNull();
            resource.ResourceCommands.Should().NotBeNull();
        }
Exemplo n.º 2
0
        public async Task ShouldAddPassengerInBooking()
        {
            //Arrange
            var journeyResource = await SelectJourney();

            var addPassengerCommand = new AddPassengerCommand(new BookingId(journeyResource.BookingId), null);

            //Act
            var resource = await _apiTestClient.Post <AddPassengerCommand, PassengerAddedResource>($"api/booking/{journeyResource.BookingId}/passenger", addPassengerCommand);

            //Assert
            resource.ResourceLinks.Should().NotBeNull();
            resource.ResourceCommands.Should().NotBeNull();
        }