Assert exceptions with Verify instead of FluentAssertions #682
Annotations
3 errors and 1 warning
🧪 Run tests
VerifyException : Directory: /home/runner/work/serilog-formatting-log4net/serilog-formatting-log4net/tests
NotEqual:
- Received: Log4NetTextFormatterTest.ExceptionFormatterThrowing.received.txt
Verified: Log4NetTextFormatterTest.ExceptionFormatterThrowing.verified.txt
Equal:
- Received: Log4NetTextFormatterTest.ExceptionFormatterThrowing.received.xml
Verified: Log4NetTextFormatterTest.ExceptionFormatterThrowing.verified.xml
FileContent:
NotEqual:
Received: Log4NetTextFormatterTest.ExceptionFormatterThrowing.received.txt
{
target: null,
SelfLog:
[Serilog.Formatting.Log4Net.Log4NetTextFormatter] An exception was thrown while formatting an exception. Using the default exception formatter.
System.InvalidOperationException: 💥 Boom 💥
at Serilog.Formatting.Log4Net.Tests.Log4NetTextFormatterTest.<>c.<ExceptionFormatterThrowing>b__29_1(Exception _) in {ProjectDirectory}Log4NetTextFormatterTest.cs:line 466
at Serilog.Formatting.Log4Net.Log4NetTextFormatter.FormatException(Exception exception) in /_/src/Log4NetTextFormatter.cs:line 424
}
Verified: Log4NetTextFormatterTest.ExceptionFormatterThrowing.verified.txt
{
target: null,
SelfLog:
[Serilog.Formatting.Log4Net.Log4NetTextFormatter] An exception was thrown while formatting an exception. Using the default exception formatter.
System.InvalidOperationException: 💥 Boom 💥
at Serilog.Formatting.Log4Net.Tests.Log4NetTextFormatterTest.<>c.<ExceptionFormatterThrowing>b__29_1(Exception _) in {ProjectDirectory}Log4NetTextFormatterTest.cs:line 466
at Serilog.Formatting.Log4Net.Log4NetTextFormatter.FormatException(Exception exception) in {SolutionDirectory}src/Log4NetTextFormatter.cs:line 424
}
|
🧪 Run tests
VerifyException : Directory: /home/runner/work/serilog-formatting-log4net/serilog-formatting-log4net/tests
NotEqual:
- Received: Log4NetTextFormatterTest.FilterPropertyThrowing.received.txt
Verified: Log4NetTextFormatterTest.FilterPropertyThrowing.verified.txt
Equal:
- Received: Log4NetTextFormatterTest.FilterPropertyThrowing.received.xml
Verified: Log4NetTextFormatterTest.FilterPropertyThrowing.verified.xml
FileContent:
NotEqual:
Received: Log4NetTextFormatterTest.FilterPropertyThrowing.received.txt
{
target: null,
SelfLog:
[Serilog.Formatting.Log4Net.Log4NetTextFormatter] An exception was thrown while filtering property 'two'. Including the property in the log4net event.
System.InvalidOperationException: Can't handle property 'two'.
at Serilog.Formatting.Log4Net.Tests.Log4NetTextFormatterTest.<>c.<FilterPropertyThrowing>b__24_1(LogEvent _, String propertyName) in {ProjectDirectory}Log4NetTextFormatterTest.cs:line 389
at Serilog.Formatting.Log4Net.Log4NetTextFormatter.IncludeProperty(LogEvent logEvent, String propertyName) in /_/src/Log4NetTextFormatter.cs:line 266
}
Verified: Log4NetTextFormatterTest.FilterPropertyThrowing.verified.txt
{
target: null,
SelfLog:
[Serilog.Formatting.Log4Net.Log4NetTextFormatter] An exception was thrown while filtering property 'two'. Including the property in the log4net event.
System.InvalidOperationException: Can't handle property 'two'.
at Serilog.Formatting.Log4Net.Tests.Log4NetTextFormatterTest.<>c.<FilterPropertyThrowing>b__24_1(LogEvent _, String propertyName) in {ProjectDirectory}Log4NetTextFormatterTest.cs:line 389
at Serilog.Formatting.Log4Net.Log4NetTextFormatter.IncludeProperty(LogEvent logEvent, String propertyName) in {SolutionDirectory}src/Log4NetTextFormatter.cs:line 266
}
|
🧪 Run tests
Process completed with exit code 1.
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Loading