public QueryAsserter( Func <TContext> contextCreator, ISetSource expectedData, Dictionary <Type, object> entitySorters, Dictionary <Type, object> entityAsserters) { _contextCreator = contextCreator; ExpectedData = expectedData; _entitySorters = entitySorters ?? new Dictionary <Type, object>(); _entityAsserters = entityAsserters ?? new Dictionary <Type, object>(); SetSourceCreator = ctx => new DefaultSetSource(ctx); _includeResultAsserter = new IncludeQueryResultAsserter(_entitySorters, _entityAsserters); }
public QueryAsserter( Func <TContext> contextCreator, IExpectedData expectedData, Dictionary <Type, Func <dynamic, object> > entitySorters, Dictionary <Type, Action <dynamic, dynamic> > entityAsserters) { _contextCreator = contextCreator; ExpectedData = expectedData; _entitySorters = entitySorters ?? new Dictionary <Type, Func <dynamic, object> >(); _entityAsserters = entityAsserters ?? new Dictionary <Type, Action <dynamic, dynamic> >(); SetExtractor = new DefaultSetExtractor(); _includeResultAsserter = new IncludeQueryResultAsserter(_entitySorters, _entityAsserters); }