public void ListenersWithoutHandlers() { var emitter = new Emitter(); var expected = new IListener[] {}; //Assert.AreEqual(expected, emitter.Listeners("foo").ToArray()); Assert.AreEqual(expected.Count(), emitter.Listeners("foo").ToArray().Count()); CollectionAssert.AreEqual(expected, emitter.Listeners("foo").ToArray()); }
public void ListenersWithoutHandlers() { var emitter = new Emitter(); var expected = new IListener[] {}; //Assert.AreEqual(expected, emitter.Listeners("foo").ToArray()); Assert.AreEqual(expected.Count(), emitter.Listeners("foo").ToArray().Count()); CollectionAssert.AreEqual(expected, emitter.Listeners("foo").ToArray()); }
public void Listeners() { var log = LogManager.GetLogger(Global.CallerName()); log.Info("Start"); var emitter = new Emitter(); var calls = new List<object>(); var listener3 = new TestListener3(calls); emitter.On("foo", listener3); var expected = new IListener[] {listener3}; Assert.AreEqual(expected.Count(), emitter.Listeners("foo").ToArray().Count()); CollectionAssert.AreEqual(expected, emitter.Listeners("foo").ToArray()); }
public void Listeners() { LogManager.SetupLogManager(); var log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod()); log.Info("Start"); var emitter = new Emitter(); var calls = new List<object>(); var listener3 = new TestListener3(calls); emitter.On("foo", listener3); var expected = new IListener[] {listener3}; Assert.AreEqual(expected.Count(), emitter.Listeners("foo").ToArray().Count()); CollectionAssert.AreEqual(expected, emitter.Listeners("foo").ToArray()); }
public void Listeners() { var log = LogManager.GetLogger(Global.CallerName()); log.Info("Start"); var emitter = new Emitter(); var calls = new List <object>(); var listener3 = new TestListener3(calls); emitter.On("foo", listener3); var expected = new IListener[] { listener3 }; Assert.AreEqual(expected.Count(), emitter.Listeners("foo").ToArray().Count()); CollectionAssert.AreEqual(expected, emitter.Listeners("foo").ToArray()); }
public void Listeners() { LogManager.SetupLogManager(); var log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod()); log.Info("Start"); var emitter = new Emitter(); var calls = new List <object>(); var listener3 = new TestListener3(calls); emitter.On("foo", listener3); var expected = new IListener[] { listener3 }; Assert.AreEqual(expected.Count(), emitter.Listeners("foo").ToArray().Count()); CollectionAssert.AreEqual(expected, emitter.Listeners("foo").ToArray()); }