public DbSchemaContextHelper(string environmentClass)
        {
            _logger = ApplicationLogging.CreateTypeLogger <DbSchemaContextHelper>();

            var optionsBuilder = new DbContextOptionsBuilder <JobAssistantContext>();

            if (!string.IsNullOrEmpty(environmentClass) && environmentClass.Contains("test"))
            {
                _logger.LogInformation("Setting-up for DB options for in-memory database.");
                optionsBuilder.UseInMemoryDatabase(environmentClass);
            }
            else
            {
                var helper             = new DbServicesHelper(new AppSettingsConfig());
                var dbConnectionString = helper.GetDbConnectionString();
                _logger.LogInformation(
                    "Setting-up for DB options for external database accessed using connection string {0}.",
                    dbConnectionString);
                optionsBuilder.UseMySql(dbConnectionString);
            }

            Options = optionsBuilder.Options;
        }
 public CategoryApiIntegrationExceptionTests(TestFixture <Startup> fixture)
 {
     _fixture = fixture;
     _client  = fixture.Client;
     _logger  = ApplicationLogging.CreateTypeLogger <CategoriesController>();
 }
 public Repository(DbContext context)
 {
     _logger        = ApplicationLogging.CreateTypeLogger <Repository>();
     _repoDbContext = context;
 }
예제 #4
0
 public JobApiLiveDbTests()
 {
     _client = GetClient();
     _logger = ApplicationLogging.CreateTypeLogger <JobsController>();
 }
 public ApplicationApiMemDbTests()
 {
     _client = GetClient();
     _logger = ApplicationLogging.CreateTypeLogger <ApplicationsController>();
 }
 public CategoryFilterRestSharpMemDbTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <CategoriesController>();
 }
 public JobApiIntegrationFixtureTests(TestFixture <Startup> fixture)
 {
     _client = fixture.Client;
     _logger = ApplicationLogging.CreateTypeLogger <JobsController>();
 }
 public MaterialFilterRestSharpMemDbTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <MaterialsController>();
 }
 public MaterialApiRestSharpLiveDbTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <MaterialsController>();
 }
 public MaterialControllerMockRepoTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <MaterialsController>();
 }
 public TradeControllerMockRepoTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <TradesController>();
 }
 public JobAssistantContext(DbContextOptions <JobAssistantContext> options) : base(options)
 {
     _logger = ApplicationLogging.CreateTypeLogger <JobAssistantContext>();
 }
 public DbSchemaManager()
 {
     _logger = ApplicationLogging.CreateTypeLogger <DbSchemaManager>();
 }
예제 #14
0
 public MaterialApiLiveDbTests()
 {
     _client = GetClient();
     _logger = ApplicationLogging.CreateTypeLogger <MaterialsController>();
 }
 public CategoryControllerMockRepoTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <CategoriesController>();
 }
 public AccessoryApiRestSharpIntegrationTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <AccessoriesController>();
 }
예제 #17
0
 public ApplicationControllerMockRepoTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <ApplicationsController>();
 }
 public JobApiRestSharpLiveDbTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <JobsController>();
 }
예제 #19
0
 public TenantApiRegistrationTests()
 {
     _client = GetClient();
     _logger = ApplicationLogging.CreateTypeLogger <TenantRegistrationController>();
 }
예제 #20
0
 public TradeApiIntegrationTests()
 {
     _client = GetClient();
     _logger = ApplicationLogging.CreateTypeLogger <JobsController>();
 }
 public ApplicationApiRestSharpIntegrationTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <ApplicationsController>();
 }
 public JobFilterRestSharpMemDbTests()
 {
     _logger = ApplicationLogging.CreateTypeLogger <JobsController>();
 }