Skip to content

Akka.Hosting.TestKit: added NullScope to xUnitLogger #570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Feb 5, 2025

Changes

This prevents a NotImplementedException from being thrown inside some test cases when working with other components that depend on scopes via Microsoft.Extensions.Logging

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

This prevents a `NotImplementedException` from being thrown inside some test cases when working with other components that depend on scopes via Microsoft.Extensions.Logging
@@ -70,7 +70,7 @@ public bool IsEnabled(LogLevel logLevel)

public IDisposable BeginScope<TState>(TState state)
{
throw new NotImplementedException();
return NullScope.Instance;
Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't alter behavior, just stops the throw

Copy link
Contributor

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

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

LGTM

@Arkatufus Arkatufus enabled auto-merge (squash) February 5, 2025 21:20
@Arkatufus Arkatufus merged commit aa8344e into akkadotnet:dev Feb 5, 2025
2 checks passed
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