EfCore.TestSupport 1.1.3

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

Install-Package EfCore.TestSupport -Version 1.1.3
dotnet add package EfCore.TestSupport --version 1.1.3
paket add EfCore.TestSupport --version 1.1.3
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 that NuGet package.

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 that NuGet package.

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 issue #2 - primary key may not be set in database
- Bug Fix: Fixed issue #3 - wrong error on sql default value
- Change: The appsetting.json file is now not required - you get an error about a connection string not being in the appsetting.json file if you use any of the commands that need a appsetting.json file.

Version History

Version Downloads Last updated
1.1.3 (current version) 60 12/1/2017
1.1.2 59 11/21/2017
1.1.1 39 11/17/2017
1.1.0 39 11/16/2017
1.0.2 49 10/13/2017
1.0.1 48 9/30/2017
1.0.0 66 9/29/2017