Testing
Baked uses NUnit for unit testing, Moq for mocking and Shouldly for assertion.
app.Layers.AddTesting();
Configuration Targets
Testing layer only exposes TestConfiguration for configuration target.
TestConfiguration
This target is provided in AddServices phase. To configure it in a feature;
configurator.ConfigureTestConfiguration(test =>
{
...
});
Phases
This layer introduces following Start phases to the application it is added;
CreateConfigurationManager: This phase runs as the earliest stage of a test run to add an emptyConfigurationManagerto the application contextBuild: This phase is added to the application internally to build anIServiceProviderfrom registered services and add to the application context so that it can be used during the test run and trigger later phases