Exemplo n.º 1
0
 public void TriggerUnsubscribeWhenBusDisposedTest()
 {
     Subscribers.Current.AssembliesToSearch.Add(Assembly.GetExecutingAssembly());
     using (WireDriver.Start())
     {
         Assert.IsFalse(ConcreteSubscriberUns.UnsubscribeCalled);
     }
     Assert.IsTrue(ConcreteSubscriberUns.UnsubscribeCalled);
 }
Exemplo n.º 2
0
 public void BusDriverRaisesEventOnDispose()
 {
     WireDriver.Stopping += WireDriver_Stopping;
     using (WireDriver.Start())
     {
         Assert.IsFalse(invoked);
     }
     WireDriver.Stopping -= WireDriver_Stopping;
     Assert.IsTrue(invoked);
 }
Exemplo n.º 3
0
        public void BusDriverRaisesEventOnStop()
        {
            WireDriver.Stopping += WireDriver_Stopping;
            WireDriver.Start();
            Assert.IsFalse(invoked);
            WireDriver.Stop();
            WireDriver.Stopping -= WireDriver_Stopping;

            Assert.IsTrue(invoked);
        }
Exemplo n.º 4
0
        private static void Main(string[] args)
        {
            using (WireDriver.Start())
            {
                Publishers.Current.WithAssembly <Program>();
                Publishers.Current.Publish(new Message1());

                Console.ReadLine();
            }

            System.Threading.Thread.Sleep(3550);
        }