/// <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();
        }
예제 #2
0
 /// <summary>
 /// Sets up all needed repositories and purges related tables.
 /// </summary>
 public CustomBatchPropRepositoryTests()
 {
     Repository = new PostgreSqlCustomBatchPropRepository(ConfigurationProvider.GetConfiguration());
     DatabasePurger.PurgeCustomBatchProps();
 }
예제 #3
0
 /// <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;
 }