public void NotTheResults() { SetLeftAndRightExpressionsResults(true, false); var leftNottedSpecification = LeftSpecification.Not(); leftNottedSpecification.Should().NotBeNull(); var isLeftValid = leftNottedSpecification.IsSatisfiedBy('A'); isLeftValid.Should().BeFalse(); var rightNottedSpecification = RightSpecification.Not(); rightNottedSpecification.Should().NotBeNull(); var isRightValid = rightNottedSpecification.IsSatisfiedBy('Z'); isRightValid.Should().BeTrue(); CheckCallTosOfLeftAndRightExpressions(Repeated.Exactly.Once, Repeated.Exactly.Once); }
public override bool IsSatisfiedBy(T entity) { return(LeftSpecification.IsSatisfiedBy(entity) && RightSpecification.IsSatisfiedBy(entity)); }
public bool IsSatisfiedBy(TEntity candidate) { return(LeftSpecification.IsSatisfiedBy(candidate) && RightSpecification.IsSatisfiedBy(candidate)); }
public async Task <bool> IsSatisfiedByAsync(TEntity candidate) { return(await LeftSpecification.IsSatisfiedByAsync(candidate) && await RightSpecification.IsSatisfiedByAsync(candidate)); }