public void Dispose_CalledOnce_ShouldCallDisposeOnOutputOnce() { var output = new LogOutputStub(); var instance = new Logger(output); instance.Dispose(); output.DisposeCount.Should().Be(1); }
public void Info_CalledOnce_ShouldCallLogMessageWithTypeMessage() { var fixture = new Fixture(); var output = new LogOutputStub(); var instance = new Logger(output); instance.Info(fixture.Create <string>()); output.LogMessages.Single().Key.Should().Be(PluginManager.MessageType.Message); }
public void Info_CalledOnce_ShouldCallLogMessageOnce() { var fixture = new Fixture(); var output = new LogOutputStub(); var instance = new Logger(output); instance.Info(fixture.Create <string>()); output.LogMessageCount.Should().Be(1); }
public void LogException_CalledOnce_ShouldCallLogMessageTwice() { var fixture = new Fixture(); var output = new LogOutputStub(); var instance = new Logger(output); instance.LogException(fixture.Create <Exception>()); output.LogExceptionsCount.Should().Be(1); }
public void Info_CalledOnce_ShouldCallLogMessageWithMessage() { var fixture = new Fixture(); var output = new LogOutputStub(); var instance = new Logger(output); var message = fixture.Create <string>(); instance.Info(message); output.LogMessages.Single().Value.Should().Contain(message); }