public void IsSatisfiedByWithDefaultSpecificationForFieldReturnsCorrectResult()
        {
            // Fixture setup
            var field         = typeof(FieldHolder <int>).GetProperty("Field");
            var dummyComparer = new DelegatingEqualityComparer();
            var sut           = new MemberComparer(dummyComparer);
            // Exercise system
            var result = sut.IsSatisfiedBy(field);

            // Verify outcome
            Assert.True(result);
            // Teardown
        }
        public void IsSatisfiedByForFieldReturnsCorrectResult(bool expected)
        {
            // Fixture setup
            var field              = typeof(FieldHolder <int>).GetField("Field");
            var dummyComparer      = new DelegatingEqualityComparer();
            var dummySpecification = new DelegatingSpecification <PropertyInfo>();

            var fieldSpecificationStub =
                new DelegatingSpecification <FieldInfo>
            {
                OnIsSatisfiedBy = x => expected
            };

            var sut = new MemberComparer(
                dummyComparer,
                dummySpecification,
                fieldSpecificationStub);
            // Exercise system
            var result = sut.IsSatisfiedBy(field);

            // Verify outcome
            Assert.Equal(expected, result);
            // Teardown
        }
        public void IsSatisfiedByForFieldReturnsCorrectResult(bool expected)
        {
            // Fixture setup
            var field = typeof(FieldHolder<int>).GetField("Field");
            var dummyComparer = new DelegatingEqualityComparer();
            var dummySpecification = new DelegatingSpecification<PropertyInfo>();

            var fieldSpecificationStub =
                new DelegatingSpecification<FieldInfo>
                {
                    OnIsSatisfiedBy = x => expected
                };

            var sut = new MemberComparer(
                dummyComparer,
                dummySpecification,
                fieldSpecificationStub);
            // Exercise system
            var result = sut.IsSatisfiedBy(field);
            // Verify outcome
            Assert.Equal(expected, result);
            // Teardown
        }
 public void IsSatisfiedByWithDefaultSpecificationForFieldReturnsCorrectResult()
 {
     // Fixture setup
     var field = typeof(FieldHolder<int>).GetProperty("Field");
     var dummyComparer = new DelegatingEqualityComparer();
     var sut = new MemberComparer(dummyComparer);
     // Exercise system
     var result = sut.IsSatisfiedBy(field);
     // Verify outcome
     Assert.True(result);
     // Teardown
 }