Skip to content

[DRY/KISS] Consolidate shared test fixtures and infrastructure #66

Description

@github-actions

Audit finding

The test suite repeatedly defines local variants of:

  • TemporaryDirectory;
  • STA-thread runners;
  • repository-root/source-file lookup;
  • settings coordinator/store setup;
  • application identities and assignments;
  • fake runtime overlays and notification lists.

The duplicated setup obscures test intent and creates multiple cleanup/timeout implementations.

Target state

Create small shared test utilities and focused scenario builders. Avoid one universal “god fixture”.

Suggested utilities:

  • TemporaryTestDirectory;
  • StaTest.Run;
  • repository/source locator;
  • settings test store/coordinator factory;
  • assignment/profile builders;
  • focused fake/recording ports.

Acceptance criteria

  • Duplicate temporary-directory and STA-runner implementations are removed.
  • Shared cleanup is reliable after failed assertions.
  • Scenario builders expose domain intent rather than implementation details.
  • Fakes remain focused per subsystem.
  • Test names and arrange/act/assert flow become shorter and clearer.
  • Test parallelism and Windows-specific apartment requirements remain correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions