Esempio n. 1
0
        public async Task ActiveBuses_GetCountByInvalidNumber_ReturnNull()
        {
            //Arrange
            int routeNumber = -1;
            var mock        = new Mock <IBusInformationService>();

            mock.Setup(x => x.GetActiveBusesCount(routeNumber, 't')).ReturnsAsync((int?)null);
            var controller = new BusController(mock.Object);

            //Act
            var result = await controller.ActiveBuses(routeNumber);

            //Assert
            Assert.IsNull(result.Model);
        }