public void IsSatisfied_Always_False()
        {
            var spec = new FalseSpecification <object>();

            Assert.That(spec.IsSatisfiedBy(new object()), Is.False);
            Assert.That(spec.IsSatisfiedBy(null), Is.False);
        }
            public void ValidCandidate_ReturnFalse()
            {
                var sut = new FalseSpecification();

                var result = sut.IsSatisfiedBy(true);

                Assert.False(result);
            }
            public void InvalidCandidate_ReturnTrue()
            {
                var sut = new FalseSpecification();

                var result = sut.IsSatisfiedBy(false);

                Assert.True(result);
            }
            public void InvalidCandidate_ReturnExpectedResultObject()
            {
                var expected = new SpecificationResult("FalseSpecification");
                var sut      = new FalseSpecification();

                var overall = sut.IsSatisfiedBy(false, out var result);

                Assert.True(overall);
                Assert.Equal(expected, result, new SpecificationResultComparer());
            }
        public void Should_True_When_Always()
        {
            // Arrange
            var spec = new FalseSpecification <object>();

            // Act
            var result = spec.IsSatisfiedBy(new object());

            // Assert
            result.Should().BeFalse();
        }
            public void ValidCandidate_ReturnExpectedResultObject()
            {
                var expected = new SpecificationResult(false, "FalseSpecification+Failed",
                                                       new FailedSpecification(typeof(FalseSpecification), true, "Value is True"));
                var sut = new FalseSpecification();

                var overall = sut.IsSatisfiedBy(true, out var result);

                Assert.False(overall);
                Assert.Equal(expected, result, new SpecificationResultComparer());
            }
Beispiel #7
0
        public void IsSatisfiedByReturnsCorrectResult()
        {
            // Fixture setup
            var sut = new FalseSpecification <T>();
            // Exercise system
            var dummyRequest = default(T);
            var result       = sut.IsSatisfiedBy(dummyRequest);

            // Verify outcome
            Assert.False(result);
            // Teardown
        }
 public When_Invoked()
 {
     option = new FalseSpecification();
     result = option.IsSatisfiedBy(new object());
 }