public async Task OrRightIsTrueOnly() { SetLeftAndRightExpressionsResults(false, true); var isValid = await LeftSpecificationAsync.OrAsync(RightSpecificationAsync).IsSatisfiedByAsync("Greens n' such."); isValid.Should().BeTrue(); CheckCallTosOfLeftAndRightExpressions(Repeated.Exactly.Once, Repeated.Exactly.Once); }
public async Task OrLeftAndRightSideAreFalse() { SetLeftAndRightExpressionsResults(false, false); var isValid = await LeftSpecificationAsync.OrAsync(RightSpecificationAsync).IsSatisfiedByAsync("Deadpool"); isValid.Should().BeFalse(); CheckCallTosOfLeftAndRightExpressions(Repeated.Exactly.Once, Repeated.Exactly.Once); }
public async Task OrLeftIsTrueOnly() { SetLeftAndRightExpressionsResults(true, false); var isValid = await LeftSpecificationAsync.OrAsync(RightSpecificationAsync).IsSatisfiedByAsync("Zeplin"); isValid.Should().BeTrue(); CheckCallTosOfLeftAndRightExpressions(Repeated.Exactly.Once, Repeated.Never); }
public async Task BothAndedSpecificationAreFalse() { SetLeftAndRightExpressionsResults(false, false); var isValid = await LeftSpecificationAsync.AndAsync(RightSpecificationAsync).IsSatisfiedByAsync("Clark Kent"); isValid.Should().BeFalse(); CheckCallTosOfLeftAndRightExpressions(Repeated.Exactly.Once, Repeated.Never); }
public async Task LeftSpecificationIsFalse() { SetLeftAndRightExpressionsResults(false, true); var isValid = await LeftSpecificationAsync.AndAsync(RightSpecificationAsync).IsSatisfiedByAsync("Wade Wilson"); isValid.Should().BeFalse(); CheckCallTosOfLeftAndRightExpressions(Repeated.Exactly.Once, Repeated.Never); }
public async Task RightSpecificationIsFalse() { SetLeftAndRightExpressionsResults(true, false); var isValid = await LeftSpecificationAsync.AndAsync(RightSpecificationAsync).IsSatisfiedByAsync("Jason Voorhees"); isValid.Should().BeFalse(); CheckCallTosOfLeftAndRightExpressions(Repeated.Exactly.Once, Repeated.Exactly.Once); }
public async Task BothAndedSpecificationsAreTrue() { SetLeftAndRightExpressionsResults(true, true); var isValid = await LeftSpecificationAsync.AndAsync(RightSpecificationAsync).IsSatisfiedByAsync("Wolverine"); isValid.Should().BeTrue(); CheckCallTosOfLeftAndRightExpressions(Repeated.Exactly.Once, Repeated.Exactly.Once); }
public async Task NotTheResults() { SetLeftAndRightExpressionsResults(true, false); var leftNottedSpecification = LeftSpecificationAsync.NotAsync(); leftNottedSpecification.Should().NotBeNull(); var isLeftValid = await leftNottedSpecification.IsSatisfiedByAsync('A'); isLeftValid.Should().BeFalse(); var rightNottedSpecification = RightSpecificationAsync.NotAsync(); rightNottedSpecification.Should().NotBeNull(); var isRightValid = await rightNottedSpecification.IsSatisfiedByAsync('Z'); isRightValid.Should().BeTrue(); CheckCallTosOfLeftAndRightExpressions(Repeated.Exactly.Once, Repeated.Exactly.Once); }