コード例 #1
0
        public async Task GetBookingStatusAsync_NoRestrictions_Success()
        {
            // Arrange
            moqService.Setup(x => x.GetBookingStatusAsync(It.IsAny <string>())).ReturnsAsync(expectedBooking);

            // Act
            var response = await controller.GetBookingStatusAsync(bookingConfirmationCode) as ObjectResult;

            var actualBooking = response.Value;

            // Assert
            moqService.Verify();
            Assert.IsInstanceOfType(response, typeof(OkObjectResult));
            Assert.AreEqual(expectedBooking, actualBooking);
        }