コード例 #1
0
        public void Test001()
        {
            var controls = ToSourceMap(@"<p foo>", ComparisonSourceType.Control);
            var tests    = ToSourceMap(@"<p foo>", ComparisonSourceType.Test);

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

            actual.ShouldBeEmpty();
        }
コード例 #2
0
        public void Test003(string diffPostfix)
        {
            var controls = ToSourceMap($@"<p foo{diffPostfix}>", ComparisonSourceType.Control);
            var tests    = ToSourceMap(@"<p foo>", ComparisonSourceType.Test);

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

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

            actual.ShouldBeEmpty();
        }
コード例 #3
0
        public void Test004(string diffPostfix)
        {
            var controls = ToSourceMap($@"<p foo{diffPostfix}>", ComparisonSourceType.Control);
            var tests    = ToSourceMap(@"<p foo>", ComparisonSourceType.Test);

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

            actual.Count.ShouldBe(1);
            actual[0].ShouldSatisfyAllConditions(
                c => c.Control.Attribute.Name.ShouldBe($"foo{diffPostfix}"),
                c => c.Test.Attribute.Name.ShouldBe("foo")
                );
        }