FluentEmail icon indicating copy to clipboard operation
FluentEmail copied to clipboard

Unable to Mock SendResponse

Open MrCodeB2 opened this issue 4 years ago • 0 comments

Hi Luke! I tried to write a unit test for my Fluentmail implementation but i am unable to mock the SendResponse.Successful, since it is readonly and the class is not virtual/abstract.

If you try something like this:

Mock<SendResponse> sendResponseMock = new();
sendResponseMock.SetupGet(x => x.Successful).Returns(true);

I get a "non-overridable members" error

Do you have an idea?

best regards Konrad

MrCodeB2 avatar Mar 09 '21 08:03 MrCodeB2