Skip to content

Releases: The-Standard-Organization/Xeption

Release - v2.7.0.0

19 Jul 18:14
15d0c8f
Compare
Choose a tag to compare
  • 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

11 Oct 18:03
c509cd5
Compare
Choose a tag to compare

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);