コード例 #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();
        }