public void Should_have_no_side_effect_if_active_flag_set_to_false()
 {
     // given
     _target.Active = false;
     // when
     _target.Emit("INFO", "message");
     // then
     _channel.DidNotReceive().Send(Arg.Any <ServerSentEvent>(), Arg.Any <CancellationToken>());
 }
 public void Should_have_no_side_effect_if_active_flag_set_to_false()
 {
     // given
     ApplyTargetConfiguration();
     // when
     LogManager.GetLogger(_target.Name, GetType()).Info("Everything's fine with NLog");
     // then
     _channel.DidNotReceive().Send(Arg.Any <ServerSentEvent>(), Arg.Any <CancellationToken>());
 }
Example #3
0
 public void Should_have_no_side_effect_if_active_flag_set_to_false()
 {
     // given
     _appender.ActivateOptions();
     BasicConfigurator.Configure(_appender);
     // when
     LogManager.GetLogger(GetType()).Info("Everything's fine");
     // then
     _channel.DidNotReceive().Send(Arg.Any <ServerSentEvent>(), Arg.Any <CancellationToken>());
 }