Exemplo n.º 1
0
        public void ToStringTest()
        {
            var          target   = new PathMemberSelectionRule("A.B.C", MemberSelectionMode.Include);
            const String expected = "[] = (Include members at A.B.C) ().";
            var          actual   = target.ToString();

            actual.Should()
            .Be(expected);
        }
Exemplo n.º 2
0
        public void ToStringTest1()
        {
            var          target   = new PathMemberSelectionRule("A.B", MemberSelectionMode.Exclude, "N", "D");
            const String expected = "[N] = (Exclude members at A.B) (D).";
            var          actual   = target.ToString();

            actual.Should()
            .Be(expected);
        }
Exemplo n.º 3
0
        public void CtorTest()
        {
            var expectedName        = RandomValueEx.GetRandomString();
            var expectedDescription = RandomValueEx.GetRandomString();
            var target = new PathMemberSelectionRule("path", MemberSelectionMode.Include, expectedName, expectedDescription);

            target.RuleName.Should()
            .Be(expectedName);
            target.RuleDescription.Should()
            .Be(expectedDescription);
        }
        public void CtorTest()
        {
            var expectedName = RandomValueEx.GetRandomString();
            var expectedDescription = RandomValueEx.GetRandomString();
            var target = new PathMemberSelectionRule( "path", MemberSelectionMode.Include, expectedName, expectedDescription );

            target.RuleName.Should()
                  .Be( expectedName );
            target.RuleDescription.Should()
                  .Be( expectedDescription );
        }
Exemplo n.º 5
0
        public void GetSelectionResultTest3()
        {
            var target = new PathMemberSelectionRule("A.B.C", MemberSelectionMode.Exclude);
            const MemberSelectionResult expected = MemberSelectionResult.Neutral;
            var actual = target.GetSelectionResult(new MemberInformation
            {
                MemberPath = "A.B.C.MyString"
            });

            actual.Should()
            .Be(expected);
        }
        public void GetSelectionResultTest3()
        {
            var target = new PathMemberSelectionRule( "A.B.C", MemberSelectionMode.Exclude );
            const MemberSelectionResult expected = MemberSelectionResult.Neutral;
            var actual = target.GetSelectionResult( new MemberInformation
            {
                MemberPath = "A.B.C.MyString"
            } );

            actual.Should()
                  .Be( expected );
        }
Exemplo n.º 7
0
        public void AddSelectionRuleTest()
        {
            var target          = new InstanceFactoryBaseAccessor("1", "2");
            var expectedRule    = new PathMemberSelectionRule("Path", MemberSelectionMode.Include);
            var expectedFactory = target.AddSelectionRule(expectedRule);

            expectedFactory.Should()
            .BeSameAs(target);
            expectedRule.Should()
            .BeSameAs(target.SelectionRules.First());
            target.SelectionRules.Count.Should()
            .Be(1);
        }
Exemplo n.º 8
0
        public void AddSelectionRuleTest()
        {
            var target = new InstanceFactoryBaseAccessor( "1", "2" );
            var expectedRule = new PathMemberSelectionRule( "Path", MemberSelectionMode.Include );
            var expectedFactory = target.AddSelectionRule( expectedRule );

            expectedFactory.Should()
                           .BeSameAs( target );
            expectedRule.Should()
                        .BeSameAs( target.SelectionRules.First() );
            target.SelectionRules.Count.Should()
                  .Be( 1 );
        }
        public void ToStringTest()
        {
            var target = new PathMemberSelectionRule( "A.B.C", MemberSelectionMode.Include );
            const String expected = "[] = (Include members at A.B.C) ().";
            var actual = target.ToString();

            actual.Should()
                  .Be( expected );
        }
        public void ToStringTest1()
        {
            var target = new PathMemberSelectionRule( "A.B", MemberSelectionMode.Exclude, "N", "D" );
            const String expected = "[N] = (Exclude members at A.B) (D).";
            var actual = target.ToString();

            actual.Should()
                  .Be( expected );
        }