Ploch.Data.EFCore.IntegrationTesting
4.0.1
dotnet add package Ploch.Data.EFCore.IntegrationTesting --version 4.0.1
NuGet\Install-Package Ploch.Data.EFCore.IntegrationTesting -Version 4.0.1
<PackageReference Include="Ploch.Data.EFCore.IntegrationTesting" Version="4.0.1" />
<PackageVersion Include="Ploch.Data.EFCore.IntegrationTesting" Version="4.0.1" />
<PackageReference Include="Ploch.Data.EFCore.IntegrationTesting" />
paket add Ploch.Data.EFCore.IntegrationTesting --version 4.0.1
#r "nuget: Ploch.Data.EFCore.IntegrationTesting, 4.0.1"
#:package Ploch.Data.EFCore.IntegrationTesting@4.0.1
#addin nuget:?package=Ploch.Data.EFCore.IntegrationTesting&version=4.0.1
#tool nuget:?package=Ploch.Data.EFCore.IntegrationTesting&version=4.0.1
Ploch.Data.EFCore.IntegrationTesting
Base class and helpers for EF Core integration tests using in-memory SQLite databases.
Key Features
- DataIntegrationTest<TDbContext> -- abstract base class that configures an in-memory SQLite database, creates the schema, and provides
DbContextandServiceProviderproperties - DbContextServicesRegistrationHelper -- static helper for building the service provider and preparing the DbContext
- Custom configurator support -- pass any
IDbContextConfiguratorto use a different database provider
Installation
<PackageReference Include="Ploch.Data.EFCore.IntegrationTesting" />
For repository and Unit of Work testing helpers, use Ploch.Data.GenericRepository.EFCore.IntegrationTesting instead.
Quick Start
using Ploch.Data.EFCore.IntegrationTesting;
public class MyDbContextTests : DataIntegrationTest<MyDbContext>
{
[Fact]
public async Task CanAddEntities()
{
DbContext.Products.Add(new Product { Title = "Test" });
await DbContext.SaveChangesAsync();
var count = await DbContext.Products.CountAsync();
count.Should().Be(1);
}
protected override void ConfigureServices(IServiceCollection services)
{
base.ConfigureServices(services);
// Register additional services here
}
}
Documentation
See the Integration Testing Guide for detailed patterns, examples, and testing strategies.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Data.Sqlite.Core (>= 10.0.5)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.5)
- Ploch.Data.EFCore (>= 4.0.1)
- Ploch.Data.EFCore.SqLite (>= 4.0.1)
-
net8.0
- Microsoft.Data.Sqlite.Core (>= 8.0.25)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.25)
- Ploch.Data.EFCore (>= 4.0.1)
- Ploch.Data.EFCore.SqLite (>= 4.0.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Ploch.Data.EFCore.IntegrationTesting:
| Package | Downloads |
|---|---|
|
Ploch.Data.GenericRepository.EFCore.IntegrationTesting
Generic Repository, Unit of Work and Data Utilities |
|
|
Ploch.Common.Data.GenericRepository.EFCore.IntegrationTesting
Generic Repository, Unit of Work and Data Utilities |
|
|
Ploch.Data.EFCore.IntegrationTesting.FluentAssertions
Generic Repository, Unit of Work and Data Utilities |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.1 | 77 | 9/10/2026 |
| 2.1.0 | 250 | 11/3/2024 |
| 2.0.0 | 239 | 6/7/2024 |
| 2.0.0-prerelease-240607015317 | 188 | 6/7/2024 |
| 1.0.0 | 234 | 6/7/2024 |