Skip to content

Release - v2.6.0

Compare
Choose a tag to compare
@cjdutoit cjdutoit released this 11 Oct 18:03
c509cd5

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