Skip to content
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

Support extra assertions #37

Open
fnipo opened this issue Sep 23, 2024 · 0 comments
Open

Support extra assertions #37

fnipo opened this issue Sep 23, 2024 · 0 comments

Comments

@fnipo
Copy link

fnipo commented Sep 23, 2024

Hi,

I have been working on a similar project until I realized this existed :)

I want to bring a few points though, that I planned to implement on my project and could be a nice addition here. I'd be very happy to contribute with their implementation:

Support contains on property value with WithValueContaining()
File: src/Serilog.Sinks.InMemory.Assertions/LogEventPropertyValueAssertions.cs
Implement properties value verification with Contains pattern
Motivation: For system that extract Metrics and have all their Monitoring based on logs, the properties are the most reliable data from the logs and the most interesting piece to test to ensure the healthy of monitoring dashboards. I propose it to have the same assertions that are provided for the log messages.

Support property verification only with HaveAnyMessage()
File: src/Serilog.Sinks.InMemory.Assertions/InMemorySinkAssertions.cs
Implement more intuitive properties-only assertions, instead of allowing a HaveMessage() with empty parameters. Or even provide a way to check Properties directly, treating them as first class citizens.

Support contains on message value with HaveMessageContaining()
File: src/Serilog.Sinks.InMemory.Assertions/InMemorySinkAssertions.cs
Implement more intuitive message assertion with Contains pattern, instead requiring 2 calls HaveMessage().Containing()

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

No branches or pull requests

1 participant