Exemplo n.º 1
0
		public void when_pushing_subscribed_event_using_base_type_then_calls_subscriber ()
		{
			var stream = new EventStream();
			var called = false;

			using (var subscription = stream.Of<ConcreteEvent> ().Subscribe (c => called = true)) {
				BaseEvent @event = new ConcreteEvent();
				stream.Push (@event);
			}

			Assert.True (called);
		}
Exemplo n.º 2
0
        public void when_pushing_subscribed_event_using_base_type_then_calls_subscriber()
        {
            var stream = new EventStream();
            var called = false;

            using (var subscription = stream.Of <ConcreteEvent>().Subscribe(c => called = true))
            {
                BaseEvent @event = new ConcreteEvent();
                stream.Push(@event);
            }

            Assert.True(called);
        }