public void TestLogLevelMethodsExclusive() { var logger = LoggerSubstitute.Create(); var underTest = new UnderTest(logger); underTest.LogDebug(); logger.Received().LogDebug("Message"); logger.DidNotReceive().LogTrace(Arg.Any <string>()); logger.DidNotReceive().LogInformation(Arg.Any <string>()); logger.DidNotReceive().LogWarning(Arg.Any <string>()); logger.DidNotReceive().LogError(Arg.Any <string>()); logger.DidNotReceive().LogCritical(Arg.Any <string>()); }
public void TestLogLevelMethods() { var logger = LoggerSubstitute.Create(); var underTest = new UnderTest(logger); underTest.LogDebug(); logger.Received().LogDebug("Message"); underTest.LogTrace(); logger.Received().LogTrace("Message"); underTest.LogInformation(); logger.Received().LogInformation("Message"); underTest.LogWarning(); logger.Received().LogWarning("Message"); underTest.LogError(); logger.Received().LogError("Message"); underTest.LogCritical(); logger.Received().LogCritical("Message"); }