public void WhenConstructedWithNullQuerySerializerShouldThrowArgumentNullException() { var dbContextFactory = new Mock <IDbContextFactory>().Object; IQuerySerializer querySerializer = null; var logger = new Mock <ILogger <EntityFrameworkCoreQueryStore> >().Object; Action act = () => new EntityFrameworkCoreQueryStore(dbContextFactory: dbContextFactory, querySerializer: querySerializer, logger: logger); act.Should().Throw <ArgumentNullException>(). And.ParamName.Should().Be("querySerializer"); }
public EntityFrameworkCoreQueryStore(IDbContextFactory dbContextFactory, IQuerySerializer querySerializer, ILogger <EntityFrameworkCoreQueryStore> logger) { if (dbContextFactory == null) { throw new ArgumentNullException(nameof(dbContextFactory)); } if (querySerializer == null) { throw new ArgumentNullException(nameof(querySerializer)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _dbContextFactory = dbContextFactory; _querySerializer = querySerializer; _logger = logger; }
public GetWebpageCachingInfo(IQuerySerializer querySerializer, PageDefaultsSettings settings) { _querySerializer = querySerializer; _settings = settings; }