コード例 #1
0
        public void Warn_CalledOnce_ShouldCallLogMessageWithTypeWarning()
        {
            var fixture = new Fixture();

            var output = new LogOutputStub();

            var instance = new Logger(output);

            instance.Warn(fixture.Create <string>());

            output.LogMessages.Single().Key.Should().Be(PluginManager.MessageType.Warning);
        }
コード例 #2
0
        public void Warn_CalledOnce_ShouldCallLogMessageOnce()
        {
            var fixture = new Fixture();

            var output = new LogOutputStub();

            var instance = new Logger(output);

            instance.Warn(fixture.Create <string>());

            output.LogMessageCount.Should().Be(1);
        }
コード例 #3
0
        public void Warn_CalledOnce_ShouldCallLogMessageWithMessage()
        {
            var fixture = new Fixture();

            var output = new LogOutputStub();

            var instance = new Logger(output);

            var message = fixture.Create <string>();

            instance.Warn(message);

            output.LogMessages.Single().Value.Should().Contain(message);
        }