public void Initialize() { flighServiceMock = new Mock <IFlightService>(); bookingServiceMock = new Mock <IBookingService>(); objController = new PassengersController(flighServiceMock.Object, bookingServiceMock.Object); CultureInfo cultureInfo = new CultureInfo("nl-NL"); listPassengers = new List <Person>() { new Person { Id = 77, Address = "P.O. Box 795, 1956 Odio. Rd.", DateBirth = DateTime.Parse("01/01/1940", cultureInfo), Email = "*****@*****.**", Gender = GenderType.Male, Name = "Branden Johnston" }, new Person { Id = 96, Address = "P.O. Box 660, 6702 Nunc St.", DateBirth = DateTime.Parse("17/03/1981", cultureInfo), Email = "*****@*****.**", Gender = GenderType.Male, Name = "Germaine Fowler" }, }; }
public void Setup() { _personRepository = new PersonAsyncRepository(); var loggerMock = new Mock <ILogger <PassengerDTO> >(); var passengerService = new PassengerService(_personRepository); _controller = new PassengersController(loggerMock.Object, passengerService); }
public void SetUp() { transportSystem = Substitute.For <ITransportSystem>(); neighborsManager = Substitute.For <INeighborsManager>(); transportSystemSatisfaction = Substitute.For <ITransportSystemSatisfaction>(); passengersFactory = Substitute.For <IPassengersFactory>(); passengersFactory.CreatePassengers(Arg.Any <int>(), Arg.Any <int>()) .Returns(new PassengerDto[0]); controller = new PassengersController(transportSystem, passengersFactory, neighborsManager, transportSystemSatisfaction); }
public void SetUp() { _mockService = new Mock <PassengerService>(); subject = new PassengersController(_mockService.Object); }
public PassengerUnitTest() { _passengerController = new PassengersController(mockDtaRepository.Object); }