Skip to content

Task 5 - ConfigManager #5

@lottejd

Description

@lottejd

Subtasks

5a

Instead of passing all the configs around, the ConfigManager should contain query methods for getting the different options.

Acceptance criteria

  • There is a GetBaseOptions method
  • There is a GetParserOptions method
  • There is a GetRenderOptions method
  • There is a GetSnapshotOptions method
  • The getters throw an exception if LoadAsync has not been run yet (and fields therefore are null)
  • LoadAsync still returns the options, but only for the unit tests to work

5b

In Program, the ConfigManager is initialized and loaded. Factories receive the options they need using query methods, while the use case should take the whole config manager as a parameter.

Acceptance criteria

  • Program loads the config
  • All three factories receive their options from config manager query methods
  • The UpdateGraphUseCase receives the config manager as a parameter, and queries for the options when needed

5c

The loading of the configs should no longer be in the ConfigManager itself, but in a new LoadConfigUseCase that initializes the ConfigManager.

Acceptance criteria

  • There is a LoadConfigUseCase with a RunAsync method
  • The use case contains all the logic for loading the config from the file, including relevant DTO's
  • RunAsync initializes and returns the ConfigManager
  • The ConfigManager now takes the four options as parameters in the constructor
  • Program.cs runs the use case

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions