Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 12, 2025

Summary

This PR implements the decision from issue #68 to move assertion functionality (Ensure and related extension roots) from Platform.Exceptions to a new Platform.Assertions library.

Key changes:

  • ✅ Created new Platform.Assertions library
  • ✅ Moved Ensure.cs, EnsureExtensions.cs and ExtensionRoots classes to Platform.Assertions
  • ✅ Updated all namespaces from Platform.Exceptions to Platform.Assertions
  • ✅ Moved all Ensure-related tests to Platform.Assertions.Tests
  • ✅ Updated Platform.Exceptions to reference Platform.Assertions
  • ✅ Updated solution file to include new projects
  • ✅ All tests pass and solution builds successfully

Test Plan

  • Platform.Assertions library builds without errors
  • Platform.Exceptions library builds with Platform.Assertions dependency
  • All Platform.Assertions tests pass (2/2)
  • All Platform.Exceptions tests continue to work
  • Full solution builds successfully

Technical Details

Assertion functionality is based on predicates (conditions), while exception throwing is unconditional. This separation follows the principle that:

  • Ensure = Assertion-based conditional exception throwing → Platform.Assertions
  • Throw = Unconditional exception triggering → Platform.Exceptions

The move maintains backward compatibility through a project reference from Platform.Exceptions to Platform.Assertions.

🤖 Generated with Claude Code


Resolves #68

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #68
@konard konard self-assigned this Sep 12, 2025
- Create new Platform.Assertions library with Ensure functionality
- Move Ensure.cs, EnsureExtensions.cs and ExtensionRoots to Platform.Assertions
- Update namespaces from Platform.Exceptions to Platform.Assertions
- Move all Ensure-related tests to Platform.Assertions.Tests
- Update Platform.Exceptions to reference Platform.Assertions
- Remove Ensure-related tags from Platform.Exceptions.csproj
- Add Platform.Assertions projects to solution file
- All tests pass and solution builds successfully

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Move Ensure and ExtensionsRoots to Platform.Assertions library? Move Ensure and ExtensionRoots to Platform.Assertions library Sep 13, 2025
@konard konard marked this pull request as ready for review September 13, 2025 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move Ensure and ExtensionsRoots to Platform.Assertions library?

1 participant