Rename test project and update namespaces for consistency#2
Merged
Conversation
Replace string interpolation with proper structured logging placeholders for OperationName and ElapsedMilliseconds to enable better log indexing and querying. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove TimedOperation<T> generic class which had implementation issues - Remove corresponding tests for removed functionality - Simplify API to only use basic TimedOperation without context properties - Maintains proper structured logging with OperationName and ElapsedMilliseconds placeholders - README already correctly documents only the simplified API 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR renames the test project and namespaces from Test to Tests for consistency, updates solution and project references, and refactors logging calls in PerformanceExtensions.cs to use structured message templates while removing the generic timing overload.
- Rename test namespace and imports across all test files.
- Update
.slnand.csprojto reflectTestsnaming. - Refactor
PerformanceExtensions.csto use structured log templates and remove theTimeOperation<T>overload and its tests.
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/LayeredCraft.StructuredLogging.Tests/WarningExtensionsTests.cs | Updated import path and namespace to .Tests |
| test/LayeredCraft.StructuredLogging.Tests/VerboseExtensionsTests.cs | Updated import path and namespace to .Tests |
| test/LayeredCraft.StructuredLogging.Tests/Testing/TestingExtensionsTests.cs | Updated import path and namespace to .Tests |
| test/LayeredCraft.StructuredLogging.Tests/TestKit/Specimens/LogLevelSpecimen.cs | Namespace updated to .Tests.TestKit.Specimens |
| test/LayeredCraft.StructuredLogging.Tests/TestKit/Specimens/EventIdSpecimen.cs | Namespace updated to .Tests.TestKit.Specimens |
| test/LayeredCraft.StructuredLogging.Tests/TestKit/Customizations/LoggerCustomization.cs | Namespace updated to .Tests.TestKit.Customizations |
| test/LayeredCraft.StructuredLogging.Tests/TestKit/Customizations/ExceptionCustomization.cs | Namespace updated to .Tests.TestKit.Customizations |
| test/LayeredCraft.StructuredLogging.Tests/TestKit/Attributes/AutoNSubstituteDataAttribute.cs | Updated import paths and namespace to .Tests.TestKit.Attributes |
| test/LayeredCraft.StructuredLogging.Tests/SimpleTest.cs | Namespace updated to .Tests |
| test/LayeredCraft.StructuredLogging.Tests/ScopeExtensionsTests.cs | Updated import path and namespace to .Tests |
| test/LayeredCraft.StructuredLogging.Tests/PerformanceExtensionsTests.cs | Updated import path, namespace, and removed generic timing tests |
| test/LayeredCraft.StructuredLogging.Tests/InformationExtensionsTests.cs | Updated import path and namespace to .Tests |
| test/LayeredCraft.StructuredLogging.Tests/ErrorExtensionsTests.cs | Updated import path and namespace to .Tests |
| test/LayeredCraft.StructuredLogging.Tests/EnrichmentExtensionsTests.cs | Updated import path and namespace to .Tests |
| test/LayeredCraft.StructuredLogging.Tests/DebugExtensionsTests.cs | Updated import path and namespace to .Tests |
| test/LayeredCraft.StructuredLogging.Tests/CriticalExtensionsTests.cs | Updated import path and namespace to .Tests |
| test/LayeredCraft.StructuredLogging.Tests/LayeredCraft.StructuredLogging.Tests.csproj | Removed old RootNamespace, added comment block for test runner |
| LayeredCraft.StructuredLogging.sln | Renamed project reference to .Tests |
| src/LayeredCraft.StructuredLogging/PerformanceExtensions.cs | Refactored logging calls to templates; removed generic overload |
Comments suppressed due to low confidence (2)
src/LayeredCraft.StructuredLogging/PerformanceExtensions.cs:35
- The generic TimeOperation overload and its associated TimedOperation class have been removed, causing a breaking change in the public API. Consider marking this overload as obsolete first or bumping the major version.
public static IDisposable TimeOperation<T>(this ILogger logger, string operationName, string propertyName, T propertyValue, LogLevel logLevel = LogLevel.Information)
test/LayeredCraft.StructuredLogging.Tests/PerformanceExtensionsTests.cs:106
- Tests for the generic TimeOperation overload were removed without replacement. Ensure this functionality is either intentionally deprecated or add tests for any new behavior.
#region TimeOperation<T> Tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Pull Request
📋 Summary
✅ Checklist
🧪 Related Issues or PRs
Closes #...
💬 Notes for Reviewers