Answers for "Moq Unittest with ILogger"

C#
0

Moq Unittest with ILogger

loggerMock.Verify(
                x => x.Log(
                    LogLevel.Information,
                    It.IsAny<EventId>(),
                    It.Is<It.IsAnyType>((o, t) => string.Equals("Index page say hello", o.ToString(), StringComparison.InvariantCultureIgnoreCase)),
                    It.IsAny<Exception>(),
                    It.IsAny<Func<It.IsAnyType, Exception, string>>()),
                Times.Once);
Posted by: Guest on June-16-2021

C# Answers by Framework

Browse Popular Code Answers by Language