EfCore.TestSupport 2.0.1

Useful tools when unit testing applications that use Entity Framework Core. See readme file on github.

Install-Package EfCore.TestSupport -Version 2.0.1
dotnet add package EfCore.TestSupport --version 2.0.1
<PackageReference Include="EfCore.TestSupport" Version="2.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EfCore.TestSupport --version 2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

EfCore.TestSupport

This git repo contains the source of the EfCore.TestSupport, and various tests to check the EfCore.TestSupport NuGet package. See Release Notes for information on changes. This project is open-source (MIT licence).

Documentation

The NuGet package EfCore.TestSupport is a netstandard2.0 library containing methods to help you unit test applications that use
Entity Framework Core for database access. This readme defines the various groups, with links to the documentation in the
EfCore.TestSupport wiki.

NOTE: The techniques are explained in much more details in chapter 15 of the book Entity Framework in Action.

The various groups of tools are:

  1. Helpers to create an in-memory Sqlite database for unit testing.
    See Sqlite in memory test database.
  2. Helpers to create an InMemory database for unit testing.
    See EF InMemory test database.
  3. Helpers to create connection strings with a unique database name.
    See Creating connection strings.
  4. Helpers for creating unique SQL Server databases for unit testing.
    See Create SQL Server databases.
  5. Helpers for creating an empty database, and deleting SQL unit test databases.
    See Quickly create empty databases.
  6. Various tools for getting test data, or file paths to test data.
    See Test Data tools.
  7. A tool for applying a SQL script file to a EF Core database.
    See Run SQL Script.
  8. Tools for capturing EF Core logging.
    See Capture EF Core logging.
  9. Tool to compare EF Core's view of the database with an actual database.
    See EfSchemaCompare.
  10. Capture cleaned production data to supply better data for unit tests.
    See Seed from Production feature.

EfCore.TestSupport

This git repo contains the source of the EfCore.TestSupport, and various tests to check the EfCore.TestSupport NuGet package. See Release Notes for information on changes. This project is open-source (MIT licence).

Documentation

The NuGet package EfCore.TestSupport is a netstandard2.0 library containing methods to help you unit test applications that use
Entity Framework Core for database access. This readme defines the various groups, with links to the documentation in the
EfCore.TestSupport wiki.

NOTE: The techniques are explained in much more details in chapter 15 of the book Entity Framework in Action.

The various groups of tools are:

  1. Helpers to create an in-memory Sqlite database for unit testing.
    See Sqlite in memory test database.
  2. Helpers to create an InMemory database for unit testing.
    See EF InMemory test database.
  3. Helpers to create connection strings with a unique database name.
    See Creating connection strings.
  4. Helpers for creating unique SQL Server databases for unit testing.
    See Create SQL Server databases.
  5. Helpers for creating an empty database, and deleting SQL unit test databases.
    See Quickly create empty databases.
  6. Various tools for getting test data, or file paths to test data.
    See Test Data tools.
  7. A tool for applying a SQL script file to a EF Core database.
    See Run SQL Script.
  8. Tools for capturing EF Core logging.
    See Capture EF Core logging.
  9. Tool to compare EF Core's view of the database with an actual database.
    See EfSchemaCompare.
  10. Capture cleaned production data to supply better data for unit tests.
    See Seed from Production feature.

Release Notes

- Bug fix: Seed from Production's WriteJsonToJsonFile and ReadSeedDataFromJsonFile didn't get the calling assembly - see issue #21

Showing the top 2 GitHub repositories that depend on EfCore.TestSupport:

Repository Stars
JonPSmith/EfCore.GenericServices
A library to help you quickly code CRUD accesses for a web/mobile/desktop application using EF Core.
JonPSmith/EfCore.GenericBizRunner
Library to run business logic when using Entity Framework Core for database accesses

Version History

Version Downloads Last updated
2.0.1 462 7/22/2019
2.0.0 2,633 6/4/2019
1.9.0 5,402 4/22/2019
1.8.0 2,370 3/25/2019
1.7.0 947 3/19/2019
1.6.1 4,318 1/28/2019
1.6.0 99 1/28/2019
1.5.2 2,655 1/4/2019
1.5.1 8,482 10/24/2018
1.5.0 1,638 10/2/2018
1.4.0 8,946 6/7/2018
1.3.1 1,733 4/1/2018
1.3.0 1,126 3/1/2018
1.2.0 527 1/22/2018
1.1.5 455 12/27/2017
1.1.4 286 12/27/2017
1.1.3 445 12/1/2017
1.1.2 258 11/21/2017
1.1.1 239 11/17/2017
1.1.0 263 11/16/2017
1.0.2 251 10/13/2017
1.0.1 236 9/30/2017
1.0.0 314 9/29/2017