public void InspectRulesNullTest()
        {
            var    target = new MemberSelectionRuleInspector();
            Action test   = () => target.Inspect(null, new MemberInformation());

            test.ShouldThrow <ArgumentNullException>();
        }
        public void InspectMemberInfoNullTest()
        {
            var    target = new MemberSelectionRuleInspector();
            Action test   = () => target.Inspect(new List <IMemberSelectionRule>(), null);

            test.ShouldThrow <ArgumentNullException>();
        }
        public void InspectNoRulesTest()
        {
            var target = new MemberSelectionRuleInspector();
            const MemberSelectionResult expected = MemberSelectionResult.Neutral;

            var actual = target.Inspect(new List <IMemberSelectionRule>(), new MemberInformation());

            actual.Should()
            .Be(expected);
        }
        public void InspectIncludeOnlyTest()
        {
            var target = new MemberSelectionRuleInspector();
            const MemberSelectionResult expected = MemberSelectionResult.IncludeMember;

            var actual = target.Inspect( new List<IMemberSelectionRule>
            {
                new ExpressionMemberSelectionRule( x => true, MemberSelectionMode.Include )
            },
                                         new MemberInformation() );
            actual.Should()
                  .Be( expected );
        }
        public void InspectIncludeOnlyTest()
        {
            var target = new MemberSelectionRuleInspector();
            const MemberSelectionResult expected = MemberSelectionResult.IncludeMember;

            var actual = target.Inspect(new List <IMemberSelectionRule>
            {
                new ExpressionMemberSelectionRule(x => true, MemberSelectionMode.Include)
            },
                                        new MemberInformation());

            actual.Should()
            .Be(expected);
        }
        public void InspectNoMatchingRulesTest()
        {
            var target = new MemberSelectionRuleInspector();
            const MemberSelectionResult expected = MemberSelectionResult.Neutral;

            var actual = target.Inspect(new List <IMemberSelectionRule>
            {
                new ExpressionMemberSelectionRule(x => false, MemberSelectionMode.Include),
                new ExpressionMemberSelectionRule(x => false, MemberSelectionMode.Exclude)
            },
                                        new MemberInformation());

            actual.Should()
            .Be(expected);
        }
        public void InspectNoMatchingRulesTest()
        {
            var target = new MemberSelectionRuleInspector();
            const MemberSelectionResult expected = MemberSelectionResult.Neutral;

            var actual = target.Inspect( new List<IMemberSelectionRule>
            {
                new ExpressionMemberSelectionRule( x => false, MemberSelectionMode.Include ),
                new ExpressionMemberSelectionRule( x => false, MemberSelectionMode.Exclude )
            },
                                         new MemberInformation() );
            actual.Should()
                  .Be( expected );
        }
 public void InspectMemberInfoNullTest()
 {
     var target = new MemberSelectionRuleInspector();
     Action test = () => target.Inspect( new List<IMemberSelectionRule>(), null );
     test.ShouldThrow<ArgumentNullException>();
 }
 public void InspectRulesNullTest()
 {
     var target = new MemberSelectionRuleInspector();
     Action test = () => target.Inspect( null, new MemberInformation() );
     test.ShouldThrow<ArgumentNullException>();
 }
        public void InspectNoRulesTest()
        {
            var target = new MemberSelectionRuleInspector();
            const MemberSelectionResult expected = MemberSelectionResult.Neutral;

            var actual = target.Inspect( new List<IMemberSelectionRule>(), new MemberInformation() );
            actual.Should()
                  .Be( expected );
        }