This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Configuring systems to run unit tests on
Arne Halvorsen edited this page Jun 7, 2021
·
12 revisions
Work in progress
Realizing a system(s) to run unit tests on requires minimal two steps:
- Implementing at least one class with the interface
ISystemConfiguration<World>
whereWorld
is the world type. - Decorate each
ISystemConfiguration<World>
implementation with at least oneSysCon
attribute: Each attribute realize a system using the implementation it decorate.
This interface declares three methods presented in the following:
IConfiguration GetConfiguration(SysCon meta);
Task<bool> AvailableAsync();
All but the most simple system need to read configuration data, this method provides it. It get passed the attribute object representing the system configured so can use the information given in the attribute for system to realize. This method is allowed to return null
if no configuration data is required.
IServiceCollection ConfigureServices(IServiceCollection services, IConfiguration configuration, SysCon meta, string currentLayer);