Implementations of IApprovalNamer should not have to call Aprovals.SetCaller()
Thank you for this great library!
While upgrading to the latest release i noticed an object reference error inside:
Verify(IApprovalWriter writer, IApprovalNamer namer, IApprovalFailureReporter reporter)
on the first line in this method. We have custom implementations of a namer, among others custom implementations.
The debugger showed currentCaller is not null, but its value is.
A workaround is calling
Aprovals.SetCaller()
before Aprovals.Verify but this was not what I expected as a library user, I believe this is a liskov substitution violation from SOLID.
Fortunatly the fix is quite simple. I have forked the project and made a failing test, and fixed this issue. Pull request is coming up
Please fix!
this was fixed in https://github.com/approvals/ApprovalTests.Net/pull/141