Exemplo n.º 1
0
        public void Should_return_false_if_writer_throws_error()
        {
            writer.When(w => w.WriteEvents(Arg.Any <LogEventInfo[]>(), Arg.Any <int>())).Throw <Exception>();
            events.TryAdd(CreateLogEvent());

            WriteEvents().Should().BeFalse();
        }
        public void TryAdd_should_return_false_if_event_was_not_added_successfully()
        {
            eventsWriter.When(w => w.WriteEvents(Arg.Any <LogEventInfo[]>(), Arg.Any <int>())).Throw <Exception>();

            muxer.TryAdd(CreateEventInfo(), true).Should().BeFalse();
        }