예제 #1
0
        public void ThrowDomainErrorIfNotStatisfied_DoesNotThrow_IfStatisfied()
        {
            // Arrange
            var isTrue = new TestSpecifications.IsTrueSpecification();

            // Act
            Assert.DoesNotThrow(() => isTrue.ThrowDomainErrorIfNotStatisfied(true));
        }
예제 #2
0
        public void ThrowDomainErrorIfNotStatisfied_Throws_IfNotSatisfied()
        {
            // Arrange
            var isTrue = new TestSpecifications.IsTrueSpecification();

            // Act
            Assert.Throws <DomainError>(() => isTrue.ThrowDomainErrorIfNotStatisfied(false));
        }
예제 #3
0
        public void IsTrueSpecification_ReturnsFalse_ForFalse()
        {
            // Arrange
            var isTrue = new TestSpecifications.IsTrueSpecification();

            // Act
            var isSatisfiedBy = isTrue.IsSatisfiedBy(false);

            // Act
            isSatisfiedBy.Should().BeFalse();
        }
예제 #4
0
        public void NotSpecification_ReturnsTrue_ForNotSatisfied()
        {
            // Arrange
            var isTrue = new TestSpecifications.IsTrueSpecification();

            // Act
            var isSatisfiedBy = isTrue.Not().IsSatisfiedBy(false);

            // Act
            isSatisfiedBy.Should().BeTrue();
        }