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

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

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

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

            AssertNoValidationErrors();
        }
 public GeoTest()
 {
     this.secondPoint = PointFactory.Make();
     this.firstPoint  = PointFactory.Make();
     this.segments    = GeoSegmentFactory.MakeList(2);
     this.model       = new Geo(
         "TestGeo",
         this.firstPoint,
         this.secondPoint,
         "red",
         this.segments,
         DefinitionFactory.Make(),
         DocblockFactory.Make(),
         CommentFactory.Make()
         );
 }
Exemple #6
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);
        }