SOLID refactoring: Abstract prerequisite checks into IPrerequisiteVerifier to bypass physical OS checks and fix Gitea CI/CD test run
Build and Test / build (push) Successful in 1m14s

This commit is contained in:
Marek Novák
2026-07-02 00:02:37 +02:00
parent dd7f1cdaa4
commit 8784ba7b57
7 changed files with 29 additions and 11 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ All future modifications to the `NixWslWrapper` solution must adhere to the foll
* **SOLID Principles**:
* *Single Responsibility (SRP)*: Keep execution strategies, builders, stream copiers, and CLI formatting separated.
* *Open/Closed (OCP)*: If we need execution methods other than WSL (e.g. SSH, Local), implement a new strategy implementing `ICommandExecutor` rather than modifying `WslCommandExecutor`.
* *Dependency Inversion (DIP)*: Inject interfaces (`ICommandExecutor`, `IStreamCopier`) and stream abstractions (`Stream`) to facilitate seamless unit testing and mock assertions.
* *Dependency Inversion (DIP)*: Inject interfaces (`ICommandExecutor`, `IStreamCopier`, `IPrerequisiteVerifier`) and stream abstractions (`Stream`) to facilitate seamless unit testing and mock assertions without hitting physical OS or environmental components.
* **Visual UI/UX Check**:
* For CLI diagnostics, use `Spectre.Console` markup (`[color]...[/]`) to color-code output. Always escape literal brackets by doubling them (`[[literal-text]]`) to prevent parser errors.
* Render a rich dashboard with `FigletText` and `Table` grids when administrative diagnostics are run (e.g. `--wsl-status`).