Skip to content

This library provides helpful items to speed the development of unit tests across all .NET Core project types. We will update this library regularly with helpful base classes/implementations.

License

IowaComputerGurus/netcore.utilities.unittesting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netcore.utilities.unittesting

Build Status

This library provides helpful items to speed the development of unit tests across all .NET Core project types. We will update this library regularly with helpful base classes/implementations.

Using ICG.NetCore.Utilities.UnitTesting

Installation

Install from NuGet

Install-Package ICG.NetCore.Utilities.UnitTesting

Register Dependencies (If using Dependency Injection)

Inside of of your project's Startup.cs within the RegisterServices method add this line of code.

services.UseIcgUnitTestUtilities();

Included Features

Object Purpose
AbstractDataServiceTest Provides an abstract class that will build the proper options for an EF In Memory Database Provider
AbstractModelTest Provides an abstract class that contains helpful items for writing unit tests for model objects
SampleDataGenerator Provides a utility for generating sample strings, dates, and the like for building unit tests, can be used with DI or standard creation
XUnitLogger Provides an implementation of ILogger that writes to xUnit's ITestOutputHelper
DatabaseFixture A test fixture with helper methods for setup and verification that allows tests to be run against a SQL database. Uses Respawn to reset the database between test runs
Detailed information can be found in the XML Comment documentation for the objects, we are working to add to this document as well.

Related Projects

ICG has a number of other related projects as well

About

This library provides helpful items to speed the development of unit tests across all .NET Core project types. We will update this library regularly with helpful base classes/implementations.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages