public void when_removing_listener_then_stops_tracing_to_added_listener()
        {
            var listener = new Mock <TraceListener>();
            var manager  = new TracerManager();

            var tracer = manager.Get("Foo");

            manager.SetTracingLevel("Foo", SourceLevels.Information);
            manager.AddListener("Foo", listener.Object);

            tracer.Info("Hi");
            manager.RemoveListener("Foo", listener.Object);
            tracer.Info("Hi");

            listener.Verify(x => x.TraceEvent(It.IsAny <TraceEventCache> (), "Foo", TraceEventType.Information, It.IsAny <int> (), "Hi", It.IsAny <object[]> ()), Times.Once());
        }
        public void when_removing_listener_then_stops_tracing_to_added_listener()
        {
            var listener = new Mock <TraceListener>();
            var manager  = new TracerManager();

            var tracerName = MethodBase.GetCurrentMethod().Name;
            var tracer     = manager.Get(tracerName);

            manager.SetTracingLevel(tracerName, SourceLevels.Information);
            manager.AddListener(tracerName, listener.Object);

            tracer.Info("Hi");
            manager.RemoveListener(tracerName, listener.Object);
            tracer.Info("Hi");

            listener.Verify(x => x.TraceEvent(It.IsAny <TraceEventCache> (), tracerName, TraceEventType.Information, It.IsAny <int> (), "Hi"), Times.Once());
        }
		public void when_removing_listener_then_stops_tracing_to_added_listener ()
		{
			var listener = new Mock<TraceListener>();
			var manager = new TracerManager();

			var tracerName = MethodBase.GetCurrentMethod().Name;
			var tracer = manager.Get(tracerName);

			manager.SetTracingLevel (tracerName, SourceLevels.Information);
			manager.AddListener (tracerName, listener.Object);

			tracer.Info ("Hi");
			manager.RemoveListener (tracerName, listener.Object);
			tracer.Info ("Hi");

			listener.Verify (x => x.TraceEvent (It.IsAny<TraceEventCache> (), tracerName, TraceEventType.Information, It.IsAny<int> (), "Hi"), Times.Once());
		}