public void IsTrueSpecification_ReturnsFalse_ForFalse() { var isTrue = new TestSpecifications.IsTrueSpecification(); var isSatisfiedBy = isTrue.IsSatisfiedBy(false); isSatisfiedBy.Should().BeFalse(); }
public void NotSpeficication_ReturnsFalse_ForSatisfied() { var isTrue = new TestSpecifications.IsTrueSpecification(); var isSatisfiedBy = isTrue.Not().IsSatisfiedBy(true); isSatisfiedBy.Should().BeFalse(); }
public void IsTrueSpecification_ReturnsTrue_ForTrue() { var isTrue = new TestSpecifications.IsTrueSpecification(); var isSatisfiedBy = isTrue.IsSatisfiedBy(true); isSatisfiedBy.Should().BeTrue(); }
public void NotSpecification_ReturnsTrue_ForNotSatisfied() { var isTrue = new TestSpecifications.IsTrueSpecification(); var isSatisfiedBy = isTrue.Not().IsSatisfiedBy(false); isSatisfiedBy.Should().BeTrue(); }
public override Task <IExecutionResult> ExecuteCommandAsync( ThingyAggregate aggregate, TestFailedResultCommand command, CancellationToken cancellationToken) { var specification = new TestSpecifications.IsTrueSpecification(); return(Task.FromResult(specification.IsNotSatisfiedByAsExecutionResult(false))); }
public void IsTrueSpecification_ReturnsFalse_ForFalse() { // Arrange var isTrue = new TestSpecifications.IsTrueSpecification(); // Act var isSatisfiedBy = isTrue.IsSatisfiedBy(false); // Act isSatisfiedBy.Should().BeFalse(); }
public void NotSpecification_ReturnsTrue_ForNotSatisfied() { // Arrange var isTrue = new TestSpecifications.IsTrueSpecification(); // Act var isSatisfiedBy = isTrue.Not().IsSatisfiedBy(false); // Act isSatisfiedBy.Should().BeTrue(); }
public void ThrowDomainErrorIfNotStatisfied_Throws_IfNotSatisfied() { // Arrange var isTrue = new TestSpecifications.IsTrueSpecification(); // Act Assert.Throws<DomainError>(() => isTrue.ThrowDomainErrorIfNotStatisfied(false)); }
public void ThrowDomainErrorIfNotStatisfied_DoesNotThrow_IfStatisfied() { // Arrange var isTrue = new TestSpecifications.IsTrueSpecification(); // Act Assert.DoesNotThrow(() => isTrue.ThrowDomainErrorIfNotStatisfied(true)); }