Tags: Avanade/UnitTestEx
Tags
v5.4.3 (#87) - *Fixed:* The `ValueAssertor.Result` is being obsoleted and replaced with `ValueAssertor.Value` to be more explicit. The `Result` property will be removed in a future version. - *Fixed:* The `ValueAssertor` JSON-based assertions updated to serialize the `Value` and compare; versus, serializing the JSON and then comparing. - *Fixed:* The `ObjectComparer.JsonAssert` is being obsoleted and replaced with `ObjectComparer.AssertJson` to be more consistent. The `JsonAssert` method will be removed in a future version.
v5.4.2 (#86) * v5.4.2 - *Fixed:* The `HttpResponseMessageAssertorBase.AssertErrors` has been extended to check for both `IDictionary<string, string[]>` (previous) and `HttpValidationProblemDetails` (new) HTTP response JSON content. * - *Fixed:* The `HttpResponseMessageAssertorBase.AssertJson` corrected to not validate the content type as this should be handled by the `AssertContentType` method. The `AssertJson` method now only checks the content against the expected JSON value.
v5.4.0 (#84) * - *Enhancement:* All `CreateHttpRequest` and related methods moved to `TesterBase` to ensure availability for all derived testers. - *Enhancement:* Added `ToHttpResponseMessageAssertor` to `ActionResultAssertor` and `ValueAssertor` that converts an `IActionResult` to an `HttpResponseMessage` and returns an `HttpResponseMessageAssertor` for further assertions. The underlying `Host` must be configured (DI) correctly for this to function; otherwise, an exception will be thrown. - *Enhancement:* Added `WithApiTester` base class per test framework to provide a shared `ApiTester` instance per test class; versus instantiating per test method. Be aware that using may result in cross-test contamination.
V5.3.0 (#82) * v5.3.0 - *Enhancement:* Added `MockHttpClientResponse.Header` methods to enable the specification of headers to be included in the mocked response. - The `MockHttpClient.WithRequestsFromResource` YAML/JSON updated to also support the specification of response headers. * Readme tweak. * Fix failing test.
v5.2.0 (#81) * v5.2.0 - *Enhancement:* Added `TesterBase<TSelf>.UseAdditionalConfiguration` method to enable additional configuration to be specified that overrides the `IHostBuilder` as the host is being built. This leverages the underlying `IConfigurationBuilder.AddInMemoryCollection` capability to add. This is intended to support additional configuration that is not part of the standard `appsettings.json` or `appsettings.unittest.json` configuration. * Tweak the build versions.
v5.1.0 (#80) - *Enhancement:* Where an `HttpRequest` is used for an Azure Functions `HttpTriggerTester` the passed `HttpRequest.PathAndQuery` is checked against that defined by the corresponding `HttpTriggerAttribute.Route` and will result in an error where different. The `HttpTrigger.WithRouteChecK` and `WithNoRouteCheck` methods control the path and query checking as needed.
v5.0.0 (#79) * ## v5.0.0 - *Enhancement:* `UnitTestEx` package updated to include only standard .NET core capabilities; new packages created to house specific as follows: - `UnitTestEx.Azure.Functions` created to house Azure Functions specific capabilities; - `UnitTestEx.Azure.ServiceBus` created to house Azure Service Bus specific capabilities; - This allows for more focused testing capabilities and provides a common pattern for ongoing extensibility; whilst also looking to limit cross package dependency challenges. - Existing usage will require references to the new packages as required. There should be limited need to update existing tests to use beyond the requirement for the root `UnitTestEx` namespace. The updated default within `UnitTestEx` is to expose the key capabilities from the root namespace. For example, `using UnitTestEx.NUnit`, should be replaced with `using UnitTestEx`. - *Enhancement:* Updated `UnitTestEx.Xunit` to align with `UnitTestEx.NUnit` and `UnitTestEx.MSTest` for consistency; the following `UnitTestBase` methods have been removed and should be replaced with: - `CreateMockHttpClientFactory()` replaced with `MockHttpClientFactory.Create()`; - `CreateGenericTester()` replaced with `GenericTester.Create()`; - `CreateApiTester<TStartup>()` replaced with `ApiTester.Create<TStartup>()`; - `CreateFunctionTester<TStartup>()` replaced with `FunctionTester.Create<TStartup>()`. * Update the CI
v4.4.2 (#78) * v4.4.2 - *Fixed*: Updated all package depenedencies to latest; resolve [Microsoft Security Advisory CVE-2024-43485](GHSA-8g4q-xg66-9fp4). * Fix log.
PreviousNext