Class XunitExtensions
Unit test related extensions.
Namespace: Neon.Xunit
Assembly: Neon.Xunit.dll
Syntax
public static class XunitExtensions
Methods
ValidateController<TServiceController>(IGeneratedServiceClient)
Compares the service model implemented by the generated service client against the actual ASP.NET service controller implementation. This ensures that the generated client actually matches the controller implementation.
note
IMPORTANT: You should always include a call to this in your service unit tests to ensure that the service models used to generate the service clients actually match the service as implemented. It is very likely for definitions and implementations to diverge over time.
Declaration
public static void ValidateController<TServiceController>(this IGeneratedServiceClient client)
Parameters
Type | Name | Description |
---|---|---|
IGeneratedServiceClient | client | The service client implementation being tested. |
Type Parameters
Name | Description |
---|---|
TServiceController | The service controller implementation type. |
Exceptions
Type | Condition |
---|---|
IncompatibleServiceException | Thrown when the service implementaton doesn't match the generated client. |