示例#1
0
        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);
        }
示例#2
0
        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);
        }