Exemple #1
0
        public void ExpressionReturnsTrueWhenAllObjectInCollectionSatisfiesExpression(TestObject testObject, bool result)
        {
            var specification = new PropertyAllSpecification <TestObject, TestObject>(p => p.Collection, new ExpressionSpecification <TestObject>(p => p.BooleanProperty));

            ExpressionSpecificationTester.TestSpecification(specification, testObject, result);
        }
Exemple #2
0
        public void IsSatisfiedByReturnsTrueWhenAllObjectInCollectionSatisfiesExpression(TestObject testObject, bool expectedResult)
        {
            var specification = new PropertyAllSpecification <TestObject, TestObject>(p => p.Collection, new ExpressionSpecification <TestObject>(p => p.BooleanProperty));

            specification.IsSatisfiedBy(testObject).ShouldBe(expectedResult);
        }