public void GetBookingById_Success_Result()
        {
            var getBookingByIdRequestModel = new GetBookingByIdRequestModel();

            Mediator.Setup(x => x.Send(It.IsAny <GetBookingByIdRequestModel>(), new CancellationToken())).
            ReturnsAsync(new GetBookingByIdResponseModel());
            var bookingController = new BookingController(Mediator.Object);

            var result = bookingController.BookingDetails(getBookingByIdRequestModel);

            Assert.IsType <OkObjectResult>(result);
        }
Пример #2
0
        public IActionResult BookingDetails([FromQuery] GetBookingByIdRequestModel requestModel)
        {
            var response = _mediator.Send(requestModel);

            return(Ok(response));
        }