/// <summary> /// Sets up all needed repositories and purges all related tables. /// </summary> public MaterialBatchRepositoryTests() { IConfiguration configuration = ConfigurationProvider.GetConfiguration(); Repository = new PostgreSqlMaterialBatchRepository(configuration); LocationsRepository = new PostgreSqlLocationsRepository(configuration); MaterialsRepository = new PostgreSqlMaterialsRepository(configuration); PlasticsRepository = new PostgreSqlPlasticsRepository(configuration); PropRepository = new PostgreSqlCustomBatchPropRepository(configuration); Dispose(); }
/// <summary> /// Sets up all needed repositories and purges related tables. /// </summary> public CustomBatchPropRepositoryTests() { Repository = new PostgreSqlCustomBatchPropRepository(ConfigurationProvider.GetConfiguration()); DatabasePurger.PurgeCustomBatchProps(); }
/// <summary> /// Initializes a new instance of the <see cref="CustomBatchPropService"/> class. /// </summary> /// <param name="loggerFactory">A factory to create loggers from.</param> /// <param name="customBatchPropRepository">The custom batch property repository.</param> public CustomBatchPropService(ILoggerFactory loggerFactory, ICustomBatchPropRepository customBatchPropRepository) { Logger = loggerFactory.CreateLogger <CustomBatchPropService>(); PropRepository = customBatchPropRepository; }