public void TestItReturnsElementsInOrder()
        {
            OutputGroup group1 = new("1");
            OutputGroup group2 = new("2");

            outputGroups.AddGroupWithFiles(group1, new List <string> {
                "foo.txt"
            });
            outputGroups.AddGroupWithFiles(group2, new List <string> {
                "goo.txt"
            });

            Label first  = LabelFactory.Make(definition: DefinitionFactory.Make("foo.txt"));
            Label second = LabelFactory.Make(definition: DefinitionFactory.Make("goo.txt"));
            Label third  = LabelFactory.Make(definition: DefinitionFactory.Make("foo.txt"));

            sectorElements.Add(first);
            sectorElements.Add(second);
            sectorElements.Add(third);

            IEnumerable <ICompilableElementProvider> expected = new List <ICompilableElementProvider>()
            {
                first,
                third,
                second
            };

            AssertCollectedItems(expected);
        }
Пример #2
0
        public void TestItPassesOnValidColours()
        {
            sectorElements.Labels.Add(LabelFactory.Make(colour: "colour1"));
            sectorElements.Labels.Add(LabelFactory.Make(colour: "123"));

            AssertNoValidationErrors();
        }
Пример #3
0
        public void TestItFailsOnInvalidColours()
        {
            sectorElements.Labels.Add(LabelFactory.Make(colour: "colour2"));
            sectorElements.Labels.Add(LabelFactory.Make(colour: "-123"));

            AssertValidationErrors(2);
        }
        public void TestItAddsLabel()
        {
            Label label = LabelFactory.Make();

            collection.Add(label);

            Assert.Equal(label, collection.Labels[0]);
        }