Пример #1
0
 public ValidationService(IFlightValidator flightValidator, IFlightSearchRequestValidator searchRequestValidator)
 {
     _flightValidator        = flightValidator;
     _searchRequestValidator = searchRequestValidator;
 }
Пример #2
0
 public SingleConditionFilter(IFlightValidator validator) : base(validator)
 {
 }
 public SeatManager(ISeatRepository seatRepository, IFlightValidator flightValidator)
 {
     this.seatRepository  = seatRepository;
     this.flightValidator = flightValidator;
 }
 public SectionManager(ISectionRepository sectionRepository, IFlightValidator flightValidator)
 {
     this.sectionRepository = sectionRepository;
     this.flightValidator   = flightValidator;
 }
        public void Setup()
        {
            // Create fakes
            _FakeFlightHandler   = Substitute.For <IFlightHandler>();
            _FakeFlightValidator = Substitute.For <IFlightValidator>();

            _uut = Substitute.For <ConflictHandler>(300, 500);

            EmptyListFlights = new List <Flight>();

            ReturnedText = $"Conflicting flights and time of occurrence\r\nATY (15500, 15500, 16000) conflicts with PRQ (15600, 15450, 15900), Time of occurrence: {DateTime.Now}\r\n\r\n";

            testFlightsWithConflicts = new List <Flight>()
            {
                new Flight()
                {
                    tag      = "ATR423",
                    position = new Coords(10005, 8000, 14000),
                },
                new Flight()
                {
                    tag      = "DTY420",
                    position = new Coords(14005, 15000, 15500),
                },
                new Flight()
                {
                    tag      = "PRY696",
                    position = new Coords(10105, 7900, 13600),
                },
            };

            testFlightsNoConflicts = new List <Flight>()
            {
                new Flight()
                {
                    tag      = "ATR423",
                    position = new Coords(75005, 15600, 14056),
                },
                new Flight()
                {
                    tag      = "DTY420",
                    position = new Coords(50605, 20654, 18860),
                },
                new Flight()
                {
                    tag      = "PRY696",
                    position = new Coords(11005, 7900, 13600),
                },
            };

            _flight1 = new Flight
            {
                tag       = "ATY",
                position  = new Coords(15500, 15500, 16000),
                timestamp = DateTime.Now,
            };

            _flight2 = new Flight
            {
                tag       = "PRQ",
                position  = new Coords(15600, 15450, 15900),
                timestamp = DateTime.Now,
            };

            _conflict = new Conflict(_flight1, _flight2);
        }
 public SingleConditionFilterBase(IFlightValidator validator)
 {
     conditionValidator = validator;
 }
Пример #7
0
 public FlightManager(IFlightRepository flightRepository, IFlightValidator flightValidator)
 {
     this.flightRepository = flightRepository;
     this.flightValidator  = flightValidator;
 }