Пример #1
0
        public void ShouldReturnListofFlights()
        {
            MockFlightProvider.Setup(m => m.GetFlightsByPage(1)).Returns(Task.FromResult(FlightsByPage.Page()));

            var fc = GetTestSubject();

            var result = fc.Get(1).Result as OkNegotiatedContentResult <List <Flight> >;

            GetContent(result).Count.Should().Be(10);
        }
Пример #2
0
        public void ShouldReturnOkResult()
        {
            MockFlightProvider.Setup(m => m.GetFlightsByPage(1)).Returns(Task.FromResult(FlightsByPage.Page()));

            var fc = GetTestSubject();

            var result = fc.Get(1).Result as OkNegotiatedContentResult <List <Flight> >;

            result.Should().NotBe(null);
        }