예제 #1
0
        internal void Init()
        {
            var geoServiceMock = new Mock <IGeoAppService>();

            geoServiceMock.Setup(a =>
                                 a.Distance(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <LenghtUnit>())).Returns(0);
            var cTeleportAppServiceMock = new Mock <ICTeleportAppService>();

            cTeleportAppServiceMock.Setup(a => a.GetAirportAsync(It.IsAny <string>())).ReturnsAsync(new Airport());
            var cacheServiceMock = new Mock <ICacheAppService>();

            cacheServiceMock.Setup(a => a.Get <Airport>(It.IsAny <string>())).Returns(new Airport());
            cacheServiceMock.Setup(a => a.Set(It.IsAny <string>(), new Airport()));

            _airportService = new AirportAppService(geoServiceMock.Object, cTeleportAppServiceMock.Object, cacheServiceMock.Object);
        }
 public AirportController(IAirportAppService airportService, IMapper mapper)
 {
     this.airportAppService = airportService;
     this.mapper            = mapper;
 }
예제 #3
0
 public AirportController(IAirportAppService airportService)
 {
     _airportService = airportService;
 }