forked from PhenX/PhenX.EntityFrameworkCore.BulkInsert
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestDbContainerOracle.cs
More file actions
34 lines (24 loc) · 989 Bytes
/
TestDbContainerOracle.cs
File metadata and controls
34 lines (24 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System.Data.Common;
using Microsoft.EntityFrameworkCore;
using Oracle.ManagedDataAccess.Client;
using PhenX.EntityFrameworkCore.BulkInsert.Oracle;
using Testcontainers.Oracle;
using Xunit;
using Xunit.Abstractions;
namespace PhenX.EntityFrameworkCore.BulkInsert.Tests.DbContainer;
[CollectionDefinition(Name)]
public class TestDbContainerOracleCollection : ICollectionFixture<TestDbContainerOracle>
{
public const string Name = "Oracle";
}
public class TestDbContainerOracle(IMessageSink messageSink) : TestDbContainer<OracleBuilder, OracleContainer>(messageSink)
{
public override DbProviderFactory DbProviderFactory => OracleClientFactory.Instance;
protected override OracleBuilder CreateBuilder() => new("gvenzl/oracle-free:23-slim-faststart");
protected override void Configure(DbContextOptionsBuilder optionsBuilder, string databaseName)
{
optionsBuilder
.UseOracle(ConnectionString)
.UseBulkInsertOracle();
}
}