/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
tests/MassTransit.EntityFrameworkCoreIntegration.Tests/Shared/EntityFrameworkTestFixture.cs
34 строки
1 KB
Chris Patterson
Integration of all external packages into MassTransit, split out into Abstractions, Middleware, and the core MassTransit assembly.
22 янв 2022, 18:24
22 янв 2022, 18:24
b5b4f50
Код
Авторство
О чём код?
namespace MassTransit.EntityFrameworkCoreIntegration.Tests.Shared { using System; using Microsoft.EntityFrameworkCore; using TestFramework; public class EntityFrameworkTestFixture<TTestDbParameters, TDbContext> : InMemoryTestFixture where TTestDbParameters : ITestDbParameters, new() where TDbContext : DbContext { protected readonly DbContextOptionsBuilder<TDbContext> DbContextOptionsBuilder; protected readonly ILockStatementProvider RawSqlLockStatements; TTestDbParameters _testDbParameters; public EntityFrameworkTestFixture() { _testDbParameters = new TTestDbParameters(); DbContextOptionsBuilder = _testDbParameters.GetDbContextOptions<TDbContext>(); RawSqlLockStatements = _testDbParameters.RawSqlLockStatements; } protected void ApplyBuilderOptions(IServiceProvider provider, DbContextOptionsBuilder<TDbContext> builder) { _testDbParameters.Apply(typeof(TDbContext), builder); } protected void ApplyBuilderOptions(DbContextOptionsBuilder builder) { _testDbParameters.Apply(typeof(TDbContext), builder); } } }