public void ShouldPushInfoToSubscriber() { var log = new PubSubLogger(); var target = Substitute.For<ILogger>(); log.RegisterSubscriber(target); log.Info("LOL"); target.Received().Info("LOL"); }
public void ShouldNotPushInfoToSubscriber_WhenTransactionInScope() { var log = new PubSubLogger(); var target = Substitute.For<ILogger>(); log.RegisterSubscriber(target); using (new LogTransaction(log)) { log.Info("LOL"); target.DidNotReceive().Info("LOL"); } target.Received().Info("LOL"); }