Skip to content

Iceberg.Scaffolding #18

@david-acker

Description

@david-acker

Build a test scaffolding CLI tool, along with related analyzers and code fixes, which use Iceberg's dependency mapping functionality for the following:

  1. Scaffolding integration tests for a specified entry point:
    • Map all upstream dependencies to their furthest extents
    • Use the provided settings and/or filtering logic for determining which dependencies should be mocked and which should use concrete implementations
    • Scaffold mocking code for these mocked dependencies
    • Setup the class containing the entry point for testing, handling dependency resolution and passing both mocks and concrete instances via constructor injection
  2. Simplify maintenance of scaffolded integration tests:
    1. Analyzers:
      • ICE001: Missing mock for {dependency}
        • Report diagnostics for dependencies which are not mocked, but require them based on the associated settings/or filtering logic for the test
      • ICE002: Unused mock
        • Report diagnostics for mocks which are no longer required after changes are made to the entry point and/or it's dependencies
    2. Code Fixes:
      • Add mock setup statements based on ICE001
      • Remove unused mock setup statements based on ICE002

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions