public void TestItFailsOnInvalidColourIntegers()
        {
            sectorElements.Add(GeoFactory.Make(
                                   "123456789",
                                   new List <GeoSegment>
            {
                GeoSegmentFactory.Make(colour: "123456789"),
            }
                                   ));

            AssertValidationErrors(2);
        }
        public void TestItPassesOnValidDefinedColours()
        {
            sectorElements.Add(GeoFactory.Make(
                                   "colour1",
                                   new List <GeoSegment>
            {
                GeoSegmentFactory.Make(colour: "colour1"),
            }
                                   ));

            AssertNoValidationErrors();
        }
        public void TestItFailsOnInvalidDefinedColours()
        {
            sectorElements.Add(GeoFactory.Make(
                                   "notcolour1",
                                   new List <GeoSegment>
            {
                GeoSegmentFactory.Make(colour: "notcolour1"),
            }
                                   ));

            AssertValidationErrors(2);
        }
        public void TestItPassesOnValidColoursIntegers()
        {
            sectorElements.Add(GeoFactory.Make(
                                   "55",
                                   new List <GeoSegment>
            {
                GeoSegmentFactory.Make(colour: "42"),
            }
                                   ));

            AssertNoValidationErrors();
        }
Example #5
0
        public void TestItFailsOnInvalidPoint()
        {
            sectorElements.Add(GeoFactory.Make(
                                   firstPoint: new Point("nottestndb"),
                                   secondPoint: new Point("testairport"),
                                   additionalSegments: new List <GeoSegment>
            {
                GeoSegmentFactory.Make(firstPoint: new Point("nottestvor"), secondPoint: new Point("testfix")),
            }
                                   ));

            sectorElements.Add(GeoFactory.Make(
                                   firstPoint: new Point("testndb"),
                                   secondPoint: new Point("nottestairport"),
                                   additionalSegments: new List <GeoSegment>
            {
                GeoSegmentFactory.Make(firstPoint: new Point("testvor"), secondPoint: new Point("nottestfix")),
            }
                                   ));

            AssertValidationErrors(4);
        }