Releases: The-Standard-Organization/Xeption
Releases · The-Standard-Organization/Xeption
Release - v2.7.0.0
-
Now support comparing
InnerExceptions
if the exceptions is an aggregate exception -
SameExceptionAs overload to provide error details if there is a mismatch
You can now either do:
bool isMatch = actualException.SameExceptionAs(expectedException;
OR to get the details if there is any differences
bool isMatch = actualException.SameExceptionAs(expectedException, out string message);
Release - v2.6.0
Addition of a SameExceptionAs
expression that can be used in unit tests like this:
this.loggingBrokerMock.Verify(broker =>
broker.LogError(It.Is(Xeptions.XeptionExtensions.SameExceptionAs(expectedException))),
Times.Once);
With the addition of this extension you no longer have to create this extension in your base test file:
private static Expression<Func<Xeption, bool>> SameExceptionAs(Xeption expectedException) =>
actualException => actualException.SameExceptionAs(expectedException);