コード例 #1
0
        public void SupportGetDoubleBookingsFromLastMonth()
        {
            var expectedDoubleBookings = GetTestDoubleBookings();

            _doubleBookingsService.GetDoubleBookingsFromLastMonth().Returns(expectedDoubleBookings);

            var response      = _doubleBookingsController.GetDoubleBookingsFromLastMonth();
            var contentResult = response as OkNegotiatedContentResult <IList <DoubleBooking> >;

            contentResult.Content.Should().NotBeNull();
        }
コード例 #2
0
        public IHttpActionResult GetDoubleBookingsFromLastMonth()
        {
            IList <DoubleBooking> doubleBookings = _doubleBookingService.GetDoubleBookingsFromLastMonth();

            if (doubleBookings == null)
            {
                return(NotFound());
            }

            return(Ok(doubleBookings));
        }