Files
Just.Core/Core.Tests/ShouldlyExtensions.cs
just e28fc62b31
Some checks failed
.NET Test / test (8.x) (push) Failing after 1m21s
.NET Test / test (9.x) (push) Failing after 1m25s
switch from FluentAssertions to Shouldly
2025-11-11 17:57:10 +04:00

12 lines
363 B
C#

namespace Just.Core.Tests;
public static class ShouldlyExtensions
{
public static TException WithMessage<TException>(this TException exception, string expectedMessage, string? customMessage = null)
where TException : Exception
{
exception.Message.ShouldBe(expectedMessage, customMessage: customMessage);
return exception;
}
}