コード例 #1
0
 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>());
 }
コード例 #2
0
 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>());
 }
コード例 #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>());
 }