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 13, 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);
All but the most simple systems 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);
This method adds the services required to realize the system. First parameter is collection to add services to and must be the method's return value. Second parameter is the configuration returned by the method GetConfiguration
explained above. ... wip...
Task<bool> AvailableAsync();