Represents the NuGet versions.
- Issue 184. Support loading the
GetBeforeRequest
after the constructor.
- Fixed: Updated target frameworks to be
netcoreapp3.1;net6.0
.
- Enhancement: Upgraded
UnitTestEx
to latest.
- Enhancement: Added
UnitTestEx
support to enableMockHttpClientFactory
for testing of mockedHttpClient
. - Enhancement: Added new
TestSetUp.GetValueFromJsonResource<T>
to enable the creation of value from an embedded resource file containing JSON. - Enhancement: Added new
ExpectJsonResourceValue
toAgentTester
to expect the value from an embedded resource file containing JSON. - Enhancement: The
ContextOutLogger
andCorrelationIdLogger
classes now support scopes and will report values in the output where selected. The various testers support a newincludeLoggingScopesInOutput
in their respective constructors to enable (is disabled by default).
- Enhancement: Updated
GrpcAgentTestBase
to accomodateGrpcAgentResult.StatusCode
rename. - Enhancement: Added new
ReturnsHttpAgentResultAsync
extension methods forIReturnsResult<TMock>
to enable dependency injection replacement of mocked responses.
- Enhancement: Updated
GrpcAgentTestBase
to enable instantiation ofAgent
with newAutoMapper.IMapper
requirement. - Enhancement: Added
ConfigureLocalServices
method toUsingAgentTesterServer
to allow dependency injection (DI) configuration for local (non-server related) services.
- Enhancement: Re-baseline all Beef components to version v4.2.1 required by
Beef.Abstractions
introduction; including updating all dependent NuGet packages to their latest respective version. - Fixed: The
ValidationTester
sets the defaultTextProvider
toDefaultTextProvier
within its static constructor to ensure the default texts are used for the validation messages.
- Enhancement: Added constructor to
UsingAgentTesterServer
to allow settings for underlyingAgentTestServer
.
- Enhancement: Added
Test
method toEventSubscriberTester
to reset the internal state so the instance can be reused for a new test execution.
- Enhancement: Adjusted the formatting of the logger output to indent second and subsequent lines.
- Fixed: The
AgentTesterWaf
was not correctly applying the test configuration (AgentTester.BuildConfiguration<TStartup>
) which excluded any test specific configurations. - Fixed: The
ValidationTester
was not failing where an error occured and the error was not expected. - Fixed: The
AgentTesterWaf
was throwing an error that thecontentRootPath
does not exist. - Enhancement: Updated project to produce symbol packages for improved debugging.
- Enhancement: Added
EventData.Source
to the test output log. - Enhancement: Updated the event testing to support new
IEventDataContentSerializer
andIEventDataConverter
. - Enhancement: Added
Response.Content
to the test detail summary where failure due to invalid status code.
- Enhancement: Updated all dependent NuGet packages to their latest respective version.
- Fixed: Associated with Issue 108. The testing output will include the
EventPublisherBase.SendAsync
count.
- Enhancement: Issue 98.
- Removed: Breaking change to
ExpectValidationException
with its deprecation (removal). Existing usage should be migrated to the more feature richValidationTester
. - Enhancement: New
ValidationTester.CreateAndRunAsync
andValidationTester.CreateAndRun
methods have been added that creates (instantiates) theValidator
using the underlying Dependency Injection (DI) capability and validates the passed value. - Enhancement: The
ValidationTester
inherits the Dependency Injection (DI)ServiceCollection
where used within the context of aTestSetUp
andUsingAgentTesterServer
combination to avoid the need to re-specify in these scenarios. - Enhancement: The
EventSubscriberTester
has had Dependency Injection (DI) support enabled similar to theValidationTester
.
- Fixed: Issue 83 fixed.
ExpectEventPublisher
updated to swallow (ignore) events raised where theExecutionContext.CorrelationId
isnull
; versus throw an exception.
- Enhancement: Added
ValidationTester
to enable simpler unit-tests (with services mocking) of validators external to the API. Provides a simpler and more test runtime performant means to validate versus having to create all the required test data within the underlying data source. - Enhancement Added
ReplaceSingleton
,ReplaceScoped
andReplaceTransient
extension methods toIServiceCollection
which will replace if existing; otherwise, add. - Enhancement: Moved all subscriber host arguments to
EventSubscriberHostArgs
to centralize and enable simple configuration via DI.
- Enhancement: Introduction of Dependency Injection support.
- Fixed: The
EventSubscriberTester
was not outputting all messages toOut
; was usingProgress
which generated confusing log output. - Enhancement Deprecated/obsoleted
AgentTester.StartupTestServer
and replaced withAgentTester.TestServerStart
to align the configuration probing withBeef.AspNetCore.WepApi.WebApiStartup.ConfigurationBuilder
for greater consistency.
- Enhancement: Added an overload to the
AgentTester.StartupTestServer
toaddUserSecrets
. This will enable: https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets.
- Enhancement: Updated all dependent NuGet packages to their latest respective version.
- Enhancement: The
TestEventSubscriberHost
updated to reuse theExecutionContext.Current
for the test. - Enhancement: Added additional capability around invalid event data (
SubscriberStatus.InvalidEventData
) conversion and auditing/logging. - Enhancement: Tidied up the test logging code to use
TestContext.Out.WriteLine
. - Fixed: The
EventSubscriberHost
was not correctly validating theResult.Status
which has been corrected.
- Added:
TestEventSubscriberHost
to suppoer the intra-domain based testing of event subscribers. - Enhancement: Added support for the use of wildcards where specifying the user name for the
ExpectChangeLogCreated
andExpectChangeLogCreated
methods.
- Enhancement: Added
GrpcAgentTester
to give similar experience toAgentTester
for invoking the gRPC service agents for intra-domain testing.
- Enhancement: Updated all dependent NuGet packages to their latest respective version.
- Enhancement: Added request and response
ContentType
to the logging to aid debugging.
- Upgrade: Upgraded the project to .NET Core 3.1.
- Added:
AgentTester.DefaultExpectNoEvents
added to effectively defaultExpectNoEvent
forcing tests to explicitly define all expected events.
- Enhancement: FxCop version upgrade; new NuGet package released in error as there was no change to runtime funcationality.
- Enhancement: Sprinkled
Task.ConfigureAwait(false)
as per https://devblogs.microsoft.com/dotnet/configureawait-faq/.
- Fixed: The
AgentTester.ExpectEvent
will now validate the event value where specified. Also, all expected events will now need to be specified, in the order that they are raised.
- Added: The
AgentTester
has been updated to reflect theIReferenceDataProvider
changes.
- Added:
ExpectEvent
,ExpectNoEvent
andExpectNoEvents
added toAgentTester
. This is enabled via the newExpectEvent
supporting class.
- Added:
TestSetUp.CreateLogger
enables creation of anILogger
that writes directly to the console.
- Added:
TestSetUp.RegisterSetUp
has had a new overload that supports an asynchronous function.
- Added:
ExpectException.Throws
has had a new overload added that supports an async method (i.e. returnsTask
). - Enhancement:
ExpectException.Throws
message argument where set to '*' will accept any message text; i.e. just validates theType
ofException
.
- Fixed: Removed any explicit Cosmos logic/dependencies into either
Beef.Core
(YAML) orBeef.Data.Cosmos
. These should be referenced as required. - Added:
ReturnsWebApiAgentResultAsync
extensions methods (for mocking via MOQ) added to supportXxxServiceAgent
mocking scenarios.
- Fixed:
Factory.ResetLocal
added to the internal finally (try-catch) for aTestSetUpAttribute
. This will ensure configuration does not cross invocations; appears to be an edgecase for parallel testing.
- Fixed: Given the
AsyncLocal
nature of the Factory Local implementation there should be no need to perform aFactory.ResetLocal
- the invocations have been removed.
- Fixed:
Factory.ResetLocal
was incorrectly being called for eachAgentTester
tester invocation; accidently resetting previously set mock objects for the test.
- Fixed: Renamed the
Run
methods toThrows
within theExpectValidationException
to be consistent withExpectException
. As this is a rename, will result in a breaking compilation error that will need to be resolved.
- Fixed:
AgentTester.StartupTestServer
optional method overload changed fromTestServer
toIWebHostBuilder
.
- Enhancement: Package
Beef.Core
v2.1.11 change asExecutionContext.SetCurrent
constraint removal required.
- Enhancement: Added asynchronous
RunAsync
methods inExpectValidationException
. - Enhancement: New overloads for
AgentTester
andTestSetupAttribute
to allow user identifier and args; these are then passed through to newCreateExecutionContext
function to allow creation overriding. - Enhancement: New
ToLongString
extension method forchar
to assist with creating long strings or repeating characters.
- New: Added support for Azure Cosmos testing, specifically creation of Cosmos Containers and related data importing.
- Enhancement: Improved the .config file and environment variable support.
- Fixed: Inconsistent version numbers.
- New: Initial publish to GitHub.