public void GetEntities()
        {
            Expression<Func<Parent, bool>> isabelleExpression = p => p.Id == Names.IsabelleOsborne;
            // var additionalQueryData = "DummyData";

            var recorder = new InMemoryRecordedRepository(Persons);
            var reverseStrategy = new MaterialiseQueryStrategy();
            var reverseStrategy2 = new MaterialiseQueryStrategy();

            //public IQueryable<T> GetEntities<T>();
            CallAndAssertGetEntities(() => recorder.GetEntities<Person>(), recorder, specificationStrategy: DefaultSpecificationStrategyType, expectedCount: 11);
            CallAndAssertGetEntities(() => recorder.GetEntities<Child>(), recorder, specificationStrategy: typeof(DefaultSpecificationQueryStrategy<Child>), expectedCount: 5);

            //public IQueryable<T> GetEntities<T>(object additionalQueryData);
            //  CallAndAssertGetEntities(() => recorder.GetEntities<Parent>(additionalQueryData), recorder, specificationStrategy: typeof(DefaultSpecificationQueryStrategy<Parent>), additionalQueryData: additionalQueryData);

            //public IQueryable<T> GetEntities<T>(params IQueryStrategy[] queryStrategy);
            CallAndAssertGetEntities(() => recorder.GetEntities<Parent>(reverseStrategy, reverseStrategy2), recorder, specificationStrategy: typeof(DefaultSpecificationQueryStrategy<Parent>), queryStrategy: typeof(AggregateQueryStrategy));

            //public IQueryable<T> GetEntities<T>(Expression<Func<T, bool>> predicate);
            CallAndAssertGetEntities(() => recorder.GetEntities<Parent>(isabelleExpression), recorder, expectedCount: 1);

            //public IQueryable<T> GetEntities<T>(Expression<Func<T, bool>> predicate, params IQueryStrategy[] queryStrategies);
            CallAndAssertGetEntities(() => recorder.GetEntities<Parent>(isabelleExpression, reverseStrategy, reverseStrategy2), recorder, queryStrategy: typeof(AggregateQueryStrategy), expectedCount: 1);

            //public IQueryable<T> GetEntities<T>(ISpecificationQueryStrategy<T> specification);
            CallAndAssertGetEntities(() => recorder.GetEntities<Parent>(ParentExpressionSpecificationStrategy), recorder, expectedCount: 1);

            //public IQueryable<T> GetEntities<T>(ISpecificationQueryStrategy<T> specification, params IQueryStrategy[] queryStrategies);
            CallAndAssertGetEntities(() => recorder.GetEntities<Parent>(ParentExpressionSpecificationStrategy, reverseStrategy, reverseStrategy2), recorder, queryStrategy: typeof(AggregateQueryStrategy), expectedCount: 1);

            //public IQueryable<T> GetEntities<T>(object additionalQueryData, ISpecificationQueryStrategy<T> specification, params IQueryStrategy[] queryStrategies);
            CallAndAssertGetEntities(() => recorder.GetEntities<Parent>(ParentExpressionSpecificationStrategy, reverseStrategy, reverseStrategy2), recorder, queryStrategy: typeof(AggregateQueryStrategy), expectedCount: 1);

        }
 public void CheckQueryStrategyOnCondition()
 {
     var strategy = new MaterialiseQueryStrategy();
     ConditionalExtensions.OnCondition(strategy, true).GetType().ShouldEqual(typeof(MaterialiseQueryStrategy));
     ConditionalExtensions.OnCondition(strategy, false).GetType().ShouldEqual(typeof(DefaultQueryStrategy));
 }
 public void CheckAllEntitiesReturned()
 {
     var simpleEntities = SimpleEntity.CreateSimpleEntities();
     var query = new MaterialiseQueryStrategy();
     simpleEntities.AddQueryStrategy(query).Count().ShouldEqual(simpleEntities.Count());
 }