Exemplo n.º 1
0
 public AllSectorlineElementsMustHaveUniqueNameTest()
 {
     sectorElements = new SectorElementCollection();
     loggerMock     = new Mock <IEventLogger>();
     first          = new Sectorline(
         "ONE",
         SectorLineDisplayRuleFactory.MakeList(2),
         SectorlineCoordinateFactory.MakeList(2),
         DefinitionFactory.Make(),
         DocblockFactory.Make(),
         CommentFactory.Make()
         );
     second = new Sectorline(
         "ONE",
         SectorLineDisplayRuleFactory.MakeList(2),
         SectorlineCoordinateFactory.MakeList(2),
         DefinitionFactory.Make(),
         DocblockFactory.Make(),
         CommentFactory.Make()
         );
     third = new Sectorline(
         "NOTONE",
         SectorLineDisplayRuleFactory.MakeList(2),
         SectorlineCoordinateFactory.MakeList(2),
         DefinitionFactory.Make(),
         DocblockFactory.Make(),
         CommentFactory.Make()
         );
     fourth = new CircleSectorline(
         "ONE",
         "EGGD",
         5.5,
         SectorLineDisplayRuleFactory.MakeList(3),
         DefinitionFactory.Make(),
         DocblockFactory.Make(),
         CommentFactory.Make()
         );
     fifth = new CircleSectorline(
         "NOTONEORTWO",
         "EGGD",
         5.5,
         SectorLineDisplayRuleFactory.MakeList(),
         DefinitionFactory.Make(),
         DocblockFactory.Make(),
         CommentFactory.Make()
         );
     sixth = new CircleSectorline(
         "ONE",
         "EGGD",
         5.5,
         SectorLineDisplayRuleFactory.MakeList(2),
         DefinitionFactory.Make(),
         DocblockFactory.Make(),
         CommentFactory.Make()
         );
     rule = new AllSectorlineElementsMustHaveUniqueName();
     args = new CompilerArguments();
 }
 public SectorlineTest()
 {
     this.displayRules = SectorLineDisplayRuleFactory.MakeList();
     this.coordinates  = SectorlineCoordinateFactory.MakeList();
     this.model        = new Sectorline(
         "Test Sectorline",
         this.displayRules,
         this.coordinates,
         DefinitionFactory.Make(),
         DocblockFactory.Make(),
         CommentFactory.Make()
         );
 }
Exemplo n.º 3
0
        public void TestItFailsOnInvalidFix(string firstFix, string secondFix)
        {
            sectorElements.Add(CircleSectorlineFactory.Make(centre: firstFix));
            sectorElements.Add(CircleSectorlineFactory.Make(centre: secondFix));

            // This one is ignored by the rule
            sectorElements.Add(
                new CircleSectorline(
                    "ONE",
                    new Coordinate("abc", "def"),
                    5.5,
                    SectorLineDisplayRuleFactory.MakeList(2),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                );

            AssertValidationErrors();
        }