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

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

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

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

            Assert.True(called);
        }