Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.26 KB

File metadata and controls

31 lines (20 loc) · 1.26 KB

CoreEx.UnitTesting

The CoreEx.UnitTesting namespace extends UnitTestEx to enable CoreEx related unit testing capabilities.


Motivation

To improve and simplify the unit testing of CoreEx related code.


Agent-initiated ASP.NET testing

To test ASP.NET Core Controllers using the Agent pattern, being the usage of a TypedHttpClientBase to invoke via an HttpRequestMessage, the following enable:


Validation testing

To test an IValidator Validation().With() extension methods are provided, extending the GenericTesterBase. The following is an example:

GenericTester.Create<Startup>()
    .ExpectErrors(
        "Name is required.",
        "Price must be between 0 and 100.")
    .Validation().With<ProductValidator, Product>(new Product { Price = 450.95m })