Exemplo n.º 1
0
        public void Test001()
        {
            var controls = ToSourceMap("<p>", ComparisonSourceType.Control);
            var tests    = ToSourceMap("<p>", ComparisonSourceType.Test);

            var actual = AttributeNameMatcher.Match(DummyContext, controls, tests).ToList();

            actual.ShouldBeEmpty();
        }
Exemplo n.º 2
0
        public void Test003(string controlHtml, string testHtml, int expectedMatches)
        {
            var controls = ToSourceMap(controlHtml, ComparisonSourceType.Control);
            var tests    = ToSourceMap(testHtml, ComparisonSourceType.Test);

            var actual = AttributeNameMatcher.Match(DummyContext, controls, tests).ToList();

            actual.Count.ShouldBe(expectedMatches);
            actual.ShouldAllBe(c => c.Control.Attribute.Name == c.Test.Attribute.Name);
        }
Exemplo n.º 3
0
        public void Test005()
        {
            var controls = ToSourceMap(@"<p foo=""bar"">", ComparisonSourceType.Control);
            var tests    = ToSourceMap(@"<p foo=""bar"">", ComparisonSourceType.Test);

            tests.MarkAsMatched(tests["foo"]);

            var actual = AttributeNameMatcher.Match(DummyContext, controls, tests).ToList();

            actual.ShouldBeEmpty();
        }