Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iowacomputergurus/netcore.utilities.unittesting
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.
https://github.com/iowacomputergurus/netcore.utilities.unittesting
aspnet-core hacktoberfest net-core unit-testing utilities
Last synced: about 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/iowacomputergurus/netcore.utilities.unittesting
- Owner: IowaComputerGurus
- License: mit
- Created: 2019-01-16T16:09:14.000Z (about 6 years ago)
- Default Branch: develop
- Last Pushed: 2024-11-25T22:17:14.000Z (2 months ago)
- Last Synced: 2024-12-02T13:41:16.790Z (2 months ago)
- Topics: aspnet-core, hacktoberfest, net-core, unit-testing, utilities
- Language: C#
- Homepage:
- Size: 159 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# netcore.utilities.unittesting ![](https://img.shields.io/github/license/iowacomputergurus/netcore.utilities.unittesting.svg)
![Build Status](https://github.com/IowaComputerGurus/netcore.utilities.unittesting/actions/workflows/ci-build.yml/badge.svg)
![](https://img.shields.io/nuget/v/icg.netcore.utilities.unittesting.svg) ![](https://img.shields.io/nuget/dt/icg.netcore.utilities.unittesting.svg)
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
``` powershell
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.
``` csharp
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`](https://xunit.net/docs/capturing-output) |
| DatabaseFixture | A test fixture with helper methods for setup and verification that allows tests to be run against a SQL database. Uses [Respawn](https://github.com/jbogard/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
* [AspNetCore.Utilities](https://www.github.com/iowacomputergurus/aspnetcore.utilities)
* [NetCore.Utilities.Spreadsheet](https://www.github.com/iowacomputergurus/netcore.utilities.spreadsheet)
* [NetCore.Utilities.Email](https://www.github.com/iowacomputergurus/netcore.utilities.email)