-
Notifications
You must be signed in to change notification settings - Fork 6
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
MissingMethodException on using LoggingAssert Contains #37
Comments
Thanks for the report, I'll have a look! |
I ended up doing the check with FluentAssertions like this: var log = _loggerFactory.Sink.LogEntries.Select(e => e.Properties).Should().BeEquivalentTo(new[] {
new Dictionary<string, string>
{
{ "{OriginalFormat}", "File {fileName} is not an xml file." },
{ "fileName", "bla.txt" }
}
}); |
Same for me 2.4.2 working , 2.5.0 not. Testing on .NET8.0 latest preview with async tests. |
@alefranz Maybe the following can help your investigation a bit: I just had the same problem while debugging Roslyn Analyzer Tests and found out that between xUnit 2.4.2 and 2.5.0 the public interface of For MELT, the problem is in those lines: MELT/src/MELT.Xunit/LoggingAssert.cs Lines 53 to 55 in b4fbc54
It looks like EqualException.ForMismatchedValues(expected, actual) is the new way to construct such an Exception now. As a comparison the Roslyn Analyzer Testing problem stems from: |
Released 0.9.0. Thanks for the investigation @bemayr . |
I updated my xUnit packages today, and got this exception:
on calling this code:
The text was updated successfully, but these errors were encountered: