public GitDbSyncServiceTests(GitDbFixture fixture) : base(fixture) { _options = ServiceProvider.GetRequiredService <IOptions <PineBlogGitDbOptions> >(); _loggerMock = new Mock <ILogger <GitDbSyncService> >(); _gitDbSyncService = new TestGitDbSyncService(_options, _loggerMock.Object); }
public BlogUnitOfWorkTests(GitDbFixture fixture) : base(fixture) { var options = ServiceProvider.GetRequiredService <IOptions <PineBlogGitDbOptions> >(); var gitDbContext = ServiceProvider.GetRequiredService <GitDbContext>(); _uow = new BlogUnitOfWork(gitDbContext, options); }
public BlogSettingsConfigurationProviderTests(GitDbFixture fixture) : base(fixture) { _options = ServiceProvider.GetRequiredService <IOptions <PineBlogGitDbOptions> >(); _provider = new BlogSettingsConfigurationProvider(new BlogSettingsConfigurationSource { Options = _options.Value, ReloadOnChange = true }); }
public GitDbTestsBase(GitDbFixture fixture) { _fixture = fixture; Configuration = new ConfigurationBuilder() .AddJsonFile("appsettings.json") .AddPineBlogGitDbConfiguration(reloadOnChange: false) .Build(); Services = new ServiceCollection(); Services.AddPineBlogCore(Configuration); Services.AddPineBlogGitDb(Configuration); // add a mock logger for the GitDbSyncService Services.AddScoped((_) => new Mock <ILogger <GitDbSyncService> >().Object); }
public ServiceCollectionExtensionsTests(GitDbFixture fixture) : base(fixture) { }