adrianiftode / Moq.ILogger

Easy verify ILogger Moq mocks
Apache License 2.0
67 stars 7 forks source link

Fix issue with the verification of the message args array #11

Closed adrianiftode closed 2 years ago

adrianiftode commented 2 years ago

Moq can define a valid verification expression that addresses the array behind the params keyword.

Handling this correctly with Moq.ILogger too so now something like

    loggerMock.VerifyLog(logger => logger.LogInformation("Processed {@Position} in {Elapsed:000} ms.", It.Is<object[]>(arg => arg != null)));

could be used

Closes #10