Example #1
0
		public void ShouldPushErrorToSubscriber()
		{
			var log = new PubSubLogger();
			var target = Substitute.For<ILogger>();

			log.RegisterSubscriber(target);

			log.Error("LOL");

			target.Received().Error("LOL");
		}
Example #2
0
		public void ShouldPushExceptionToSubscriber()
		{
			var log = new PubSubLogger();
			var target = Substitute.For<ILogger>();
			var exception = new Exception();

			log.RegisterSubscriber(target);

			log.Error(exception);

			target.Received().Error(exception);
		}