EfCore.TestSupport 1.5.1

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

Install-Package EfCore.TestSupport -Version 1.5.1
dotnet add package EfCore.TestSupport --version 1.5.1
paket add EfCore.TestSupport --version 1.5.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.

This project is open-source (MIT licence).

See Release Notes for information on changes.

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.

Here is an image covering just a few of the methods, in bold available in this library.

Examples of libray methods in use

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.

EfCore.TestSupport

This git repo contains the source of the EfCore.TestSupport, and various tests to check the EfCore.TestSupport NuGet package.

This project is open-source (MIT licence).

See Release Notes for information on changes.

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.

Here is an image covering just a few of the methods, in bold available in this library.

Examples of libray methods in use

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.

Release Notes

- Bug fix: Fixed bug in CompareEfSql where two tables have the same name, but different schemas, caused an exception

Version History

Version Downloads Last updated
1.5.1 406 10/24/2018
1.5.0 613 10/2/2018
1.4.0 2,929 6/7/2018
1.3.1 1,439 4/1/2018
1.3.0 951 3/1/2018
1.2.0 340 1/22/2018
1.1.5 194 12/27/2017
1.1.4 123 12/27/2017
1.1.3 243 12/1/2017
1.1.2 114 11/21/2017
1.1.1 92 11/17/2017
1.1.0 95 11/16/2017
1.0.2 114 10/13/2017
1.0.1 103 9/30/2017
1.0.0 138 9/29/2017