Skip to content

Rename test project and update namespaces for consistency#2

Merged
ncipollina merged 3 commits into
mainfrom
feature/fix-unit-test-publish
Jun 9, 2025
Merged

Rename test project and update namespaces for consistency#2
ncipollina merged 3 commits into
mainfrom
feature/fix-unit-test-publish

Conversation

@ncipollina

Copy link
Copy Markdown
Contributor

🚀 Pull Request

📋 Summary

Briefly describe what this PR does and why it's needed.


✅ Checklist

  • My changes build cleanly
  • I’ve added/updated relevant tests
  • I’ve added/updated documentation or README
  • I’ve followed the coding style for this project
  • I’ve tested the changes locally (if applicable)

🧪 Related Issues or PRs

Closes #...


💬 Notes for Reviewers

Any specific areas to look at, known issues, or follow-up work.

ncipollina and others added 2 commits June 9, 2025 14:50
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>
@ncipollina
ncipollina requested a review from Copilot June 9, 2025 19:01

This comment was marked as outdated.

- 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>
@ncipollina
ncipollina requested a review from Copilot June 9, 2025 20:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .sln and .csproj to reflect Tests naming.
  • Refactor PerformanceExtensions.cs to use structured log templates and remove the TimeOperation<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

@ncipollina
ncipollina merged commit 755dffa into main Jun 9, 2025
1 check passed
@ncipollina
ncipollina deleted the feature/fix-unit-test-publish branch June 9, 2025 20:22
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.

2 participants