public void ExpressionReturnsTrueWhenAnyObjectInCollectionSatisfiesExpression(TestObject testObject, bool expectedResult) { var specification = new PropertyAnySpecification <TestObject, TestObject>(p => p.Collection, new ExpressionSpecification <TestObject>(p => p.BooleanProperty)); ExpressionSpecificationTester.TestSpecification(specification, testObject, expectedResult); }
public void IsSatisfiedByReturnsTrueWhenAnyObjectInCollectionSatisfiesExpression(TestObject testObject, bool expectedResult) { var specification = new PropertyAnySpecification <TestObject, TestObject>(p => p.Collection, new ExpressionSpecification <TestObject>(p => p.BooleanProperty)); specification.IsSatisfiedBy(testObject).ShouldBe(expectedResult); }