Skip to content

Migrate Unit.Tests → Web.Tests and remove Unit.Tests project #151

Description

@mpaulosky

Summary

The tests/Unit.Tests project is redundant — its handler tests either already exist in tests/Web.Tests or need to be merged there. This issue removes Unit.Tests entirely after migrating all unique tests.

Work Required

1. Migrate unique tests into Web.Tests

File Action
Handlers/GetBlogPostByIdHandlerTests.cs Add to Web.Tests/Handlers/ (not present there)
Handlers/CreateBlogPostHandlerTests.cs Merge unique tests (Handle_Success_DoesNotCallInvalidateById) into Web.Tests version
Handlers/EditBlogPostHandlerTests.cs Merge unique tests (Handle_ConcurrentUpdate_ReturnsConcurrencyErrorCode) into Web.Tests version
Handlers/GetBlogPostsHandlerTests.cs Compare and merge any unique tests
Handlers/DeleteBlogPostHandlerTests.cs Compare and merge any unique tests
  • Update all namespaces from Unit.HandlersWeb.Handlers
  • Update Web.Tests/GlobalUsings.cs to add any missing usings (e.g. Microsoft.EntityFrameworkCore, MyBlog.Domain.Abstractions)
  • Ensure Web.Tests.csproj has Microsoft.EntityFrameworkCore package reference if needed for DbUpdateConcurrencyException

2. Remove Unit.Tests project

3. Verify

  • dotnet build passes with zero errors
  • dotnet test tests/Web.Tests passes

Branch

squad/144-migrate-unit-tests-to-web-tests (use next available issue number once created)

Acceptance Criteria

  • All unique Unit.Tests handler tests exist in Web.Tests
  • tests/Unit.Tests/ directory is gone
  • Solution file, workflows, and AssemblyInfo updated
  • Build and tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    squad:gimliAssigned to Gimli (Tester)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions