コード例 #1
0
        public void GetSelectionResultTest4()
        {
            var target = new TypeMemberSelectionRule( typeof (String), MemberSelectionMode.Exclude, CompareMode.Is );
            const MemberSelectionResult expected = MemberSelectionResult.ExcludeMember;

            var actual = target.GetSelectionResult( new MemberInformation { MemberType = typeof (String) } );
            actual.Should()
                  .Be( expected );
        }
コード例 #2
0
        public void ToStringTest3()
        {
            var          target   = new TypeMemberSelectionRule(typeof(Char), MemberSelectionMode.Exclude, CompareMode.IsNot, "10", "100");
            const String expected = "[10] = (Exclude where type IsNot Char) (100).";

            var actual = target.ToString();

            actual.Should()
            .Be(expected);
        }
コード例 #3
0
        public void ToStringTest2()
        {
            var          target   = new TypeMemberSelectionRule(typeof(Double), MemberSelectionMode.Include, CompareMode.IsNot, "1", "2");
            const String expected = "[1] = (Include where type IsNot Double) (2).";

            var actual = target.ToString();

            actual.Should()
            .Be(expected);
        }
コード例 #4
0
        public void ToStringTest1()
        {
            var          target   = new TypeMemberSelectionRule(typeof(Int32), MemberSelectionMode.Exclude, CompareMode.Is, "X", "Y");
            const String expected = "[X] = (Exclude where type Is Int32) (Y).";

            var actual = target.ToString();

            actual.Should()
            .Be(expected);
        }
コード例 #5
0
        public void ToStringTest()
        {
            var          target   = new TypeMemberSelectionRule(typeof(String), MemberSelectionMode.Include, CompareMode.Is);
            const String expected = "[] = (Include where type Is String) ().";

            var actual = target.ToString();

            actual.Should()
            .Be(expected);
        }
コード例 #6
0
        public void CtorTest()
        {
            var expectedName        = RandomValueEx.GetRandomString();
            var expectedDescription = RandomValueEx.GetRandomString();
            var target = new TypeMemberSelectionRule(typeof(String), MemberSelectionMode.Include, CompareMode.Is, expectedName, expectedDescription);

            target.RuleName.Should()
            .Be(expectedName);
            target.RuleDescription.Should()
            .Be(expectedDescription);
        }
コード例 #7
0
        public void CtorTest()
        {
            var expectedName = RandomValueEx.GetRandomString();
            var expectedDescription = RandomValueEx.GetRandomString();
            var target = new TypeMemberSelectionRule( typeof (String), MemberSelectionMode.Include, CompareMode.Is, expectedName, expectedDescription );

            target.RuleName.Should()
                  .Be( expectedName );
            target.RuleDescription.Should()
                  .Be( expectedDescription );
        }
コード例 #8
0
        public void GetSelectionResultTest4()
        {
            var target = new TypeMemberSelectionRule(typeof(String), MemberSelectionMode.Exclude, CompareMode.Is);
            const MemberSelectionResult expected = MemberSelectionResult.ExcludeMember;

            var actual = target.GetSelectionResult(new MemberInformation {
                MemberType = typeof(String)
            });

            actual.Should()
            .Be(expected);
        }
コード例 #9
0
        public void ToStringTest3()
        {
            var target = new TypeMemberSelectionRule( typeof (Char), MemberSelectionMode.Exclude, CompareMode.IsNot, "10", "100" );
            const String expected = "[10] = (Exclude where type IsNot Char) (100).";

            var actual = target.ToString();
            actual.Should()
                  .Be( expected );
        }
コード例 #10
0
        public void ToStringTest2()
        {
            var target = new TypeMemberSelectionRule( typeof (Double), MemberSelectionMode.Include, CompareMode.IsNot, "1", "2" );
            const String expected = "[1] = (Include where type IsNot Double) (2).";

            var actual = target.ToString();
            actual.Should()
                  .Be( expected );
        }
コード例 #11
0
        public void ToStringTest1()
        {
            var target = new TypeMemberSelectionRule( typeof (Int32), MemberSelectionMode.Exclude, CompareMode.Is, "X", "Y" );
            const String expected = "[X] = (Exclude where type Is Int32) (Y).";

            var actual = target.ToString();
            actual.Should()
                  .Be( expected );
        }
コード例 #12
0
        public void ToStringTest()
        {
            var target = new TypeMemberSelectionRule( typeof (String), MemberSelectionMode.Include, CompareMode.Is );
            const String expected = "[] = (Include where type Is String) ().";

            var actual = target.ToString();
            actual.Should()
                  .Be( expected );
        }