Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Configuring systems to run unit tests on

Arne Halvorsen edited this page Jun 7, 2021 · 12 revisions

Work in progress

Realizing a system to run unit tests on by implementing ISystemConfiguration<World>

Realizing a system(s) to run unit tests on requires minimal two steps:

  1. Implementing at least one class with the interface ISystemConfiguration<World> where World is the world type.
  2. Decorate each ISystemConfiguration<World> implementation with at least one SysCon attribute: Each attribute realize a system using the implementation it decorate.

About implementing the ISystemConfiguration<World> interface

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);

About realizing system(s) to run unit tests on with the SysCon class attribute

About testing if a system available

Clone this wiki locally