Esempio n. 1
0
        public void TestItPassesOnAllValid(string first, string second, string third)
        {
            sectorElements.Add(
                SectorFactory.Make(
                    departureAirports: new List <SectorDepartureAirports>
            {
                SectorDepartureAirportsFactory.Make(new List <string> {
                    first, second
                })
            }
                    )
                );
            sectorElements.Add(
                SectorFactory.Make(
                    departureAirports: new List <SectorDepartureAirports>
            {
                SectorDepartureAirportsFactory.Make(new List <string> {
                    second, third
                })
            }
                    )
                );

            AssertNoValidationErrors();
        }
Esempio n. 2
0
        public void TestItFailsOnInvalid(string first, string second, string third, int timesCalled)
        {
            sectorElements.Add(
                SectorFactory.Make(
                    departureAirports: new List <SectorDepartureAirports>
            {
                SectorDepartureAirportsFactory.Make(new List <string> {
                    first, second
                })
            }
                    )
                );
            sectorElements.Add(
                SectorFactory.Make(
                    departureAirports: new List <SectorDepartureAirports>
            {
                SectorDepartureAirportsFactory.Make(new List <string> {
                    second, third
                })
            }
                    )
                );

            AssertValidationErrors(timesCalled);
        }
        public SectorTest()
        {
            this.altOwners         = SectorAlternateOwnerHierarchyFactory.MakeList();
            this.guests            = SectorGuestFactory.MakeList();
            this.active            = SectorActiveFactory.MakeList();
            this.owners            = SectorOwnerHierarchyFactory.Make();
            this.borders           = SectorBorderFactory.MakeList();
            this.departureAirports = SectorDepartureAirportsFactory.MakeList();
            this.arrivalAirports   = SectorArrivalAirportsFactory.MakeList();

            this.model = new Sector(
                "COOL",
                5000,
                66000,
                this.owners,
                this.altOwners,
                this.active,
                this.guests,
                this.borders,
                this.arrivalAirports,
                this.departureAirports,
                DefinitionFactory.Make(),
                DocblockFactory.Make(),
                CommentFactory.Make()
                );
        }