Skip to content

Make the example exemplary (model the house testing pattern)Β #170

@devantler

Description

@devantler

πŸ€– Generated by the Daily AI Assistant

Part of the roadmap epic #167 (direction 3 β€” exemplary by example).

Problem

The scaffold's example models no pattern a new project would want to copy:

  • src/Example/ExampleClass.cs is an empty class (no members).
  • tests/Example.Tests/ExampleClassTests.cs has a single Test1() that only does Assert.NotNull(new ExampleClass()).

The test name (Test1) and the trivial assertion teach an adopter nothing about the house testing convention. Since the whole point of a template is to set the pattern, the example should be exemplary β€” while staying minimal.

Proposed direction

  • Give ExampleClass one minimal, idiomatic, documented member (e.g. a trivial pure method or property) β€” enough to have real behaviour to assert. Keep it tiny; no product features.
  • Rewrite the test to model the house convention: a descriptive name (Method_State_ExpectedResult), explicit Arrange / Act / Assert, and an assertion on actual behaviour (not just non-null).
  • Keep XML doc comments on both (the projects already set GenerateDocumentationFile).

Acceptance criteria

  • ExampleClass has one documented member; the example remains minimal and idiomatic.
  • The test follows the Method_State_Expected naming convention with clear AAA and asserts real behaviour.
  • dotnet build + dotnet test pass with TreatWarningsAsErrors enabled.

Size

XS β€” lowest priority of the three; pure scaffolding polish. Good first issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions