public void IsSatisfiedByNullThrows()
        {
            // Arrange
            var sut = new SpecifiedNullCommand <PropertyHolder <object>, object>(ph => ph.Property);

            // Act & assert
            Assert.Throws <ArgumentNullException>(() => sut.IsSatisfiedBy(null));
        }
Пример #2
0
        public void IsSatisfiedByNullThrows()
        {
            // Fixture setup
            var sut = new SpecifiedNullCommand <PropertyHolder <object>, object>(ph => ph.Property);

            // Exercise system and verify outcome
            Assert.Throws <ArgumentNullException>(() => sut.IsSatisfiedBy(null));
            // Teardown
        }
        public void IsSatisfiedByReturnsFalseForAnonymousRequest()
        {
            // Arrange
            var request = new object();
            var sut     = new SpecifiedNullCommand <PropertyHolder <object>, object>(ph => ph.Property);
            // Act
            bool result = sut.IsSatisfiedBy(request);

            // Assert
            Assert.False(result);
        }
        public void IsSatisfiedByReturnsTrueForDerivedProperty()
        {
            // Arrange
            var request = typeof(ConcreteType).GetProperty("Property1");
            var sut     = new SpecifiedNullCommand <AbstractType, object>(x => x.Property1);
            // Act
            var result = sut.IsSatisfiedBy(request);

            // Assert
            Assert.True(result);
        }
        public void IsSatisfiedByReturnsTrueForIdentifiedProperty()
        {
            // Arrange
            var request = typeof(DoublePropertyHolder <object, object>).GetProperty("Property1");
            var sut     = new SpecifiedNullCommand <DoublePropertyHolder <object, object>, object>(ph => ph.Property1);
            // Act
            bool result = sut.IsSatisfiedBy(request);

            // Assert
            Assert.True(result);
        }
Пример #6
0
        public void IsSatisfiedByReturnsTrueForDerivedProperty()
        {
            // Fixture setup
            var request = typeof(ConcreteType).GetProperty("Property1");
            var sut     = new SpecifiedNullCommand <AbstractType, object>(x => x.Property1);
            // Exercise system
            var result = sut.IsSatisfiedBy(request);

            // Verify outcome
            Assert.True(result);
            // Teardown
        }
Пример #7
0
        public void IsSatisfiedByReturnsTrueForIdentifiedProperty()
        {
            // Fixture setup
            var request = typeof(DoublePropertyHolder <object, object>).GetProperty("Property1");
            var sut     = new SpecifiedNullCommand <DoublePropertyHolder <object, object>, object>(ph => ph.Property1);
            // Exercise system
            bool result = sut.IsSatisfiedBy(request);

            // Verify outcome
            Assert.True(result);
            // Teardown
        }
Пример #8
0
        public void IsSatisfiedByReturnsFalseForAnonymousRequest()
        {
            // Fixture setup
            var request = new object();
            var sut     = new SpecifiedNullCommand <PropertyHolder <object>, object>(ph => ph.Property);
            // Exercise system
            bool result = sut.IsSatisfiedBy(request);

            // Verify outcome
            Assert.False(result);
            // Teardown
        }
 public void IsSatisfiedByReturnsFalseForAnonymousRequest()
 {
     // Fixture setup
     var request = new object();
     var sut = new SpecifiedNullCommand<PropertyHolder<object>, object>(ph => ph.Property);
     // Exercise system
     bool result = sut.IsSatisfiedBy(request);
     // Verify outcome
     Assert.False(result);
     // Teardown
 }
 public void IsSatisfiedByNullThrows()
 {
     // Fixture setup
     var sut = new SpecifiedNullCommand<PropertyHolder<object>, object>(ph => ph.Property);
     // Exercise system and verify outcome
     Assert.Throws<ArgumentNullException>(() => sut.IsSatisfiedBy(null));
     // Teardown
 }
 public void IsSatisfiedByReturnsTrueForDerivedProperty()
 {
     // Fixture setup
     var request = typeof(ConcreteType).GetProperty("Property1");
     var sut = new SpecifiedNullCommand<AbstractType, object>(x => x.Property1);
     // Exercise system
     var result = sut.IsSatisfiedBy(request);
     // Verify outcome
     Assert.True(result);
     // Teardown
 }
 public void IsSatisfiedByReturnsTrueForIdentifiedProperty()
 {
     // Fixture setup
     var request = typeof(DoublePropertyHolder<object, object>).GetProperty("Property1");
     var sut = new SpecifiedNullCommand<DoublePropertyHolder<object, object>, object>(ph => ph.Property1);
     // Exercise system
     bool result = sut.IsSatisfiedBy(request);
     // Verify outcome
     Assert.True(result);
     // Teardown
 }