Exemple #1
0
        public void Action_WithIClosableInterface_AreDisposed()
        {
            var action = new ClosableAction();

            scheduler.Actions.Insert(0, action);
            raiser.Raise(null, new EventArgs());
            Assert.That(action.wasExecuted);
            Assert.That(action.wasClosed);
        }
Exemple #2
0
        public void Action_withIClosable_interface_are_disposed()
        {
            var action = new ClosableAction();

            _scheduler.Actions.Insert(0, action);
            _heart.Raise(x => x.Beat += null, new EventArgs());
            action.wasClosed.ShouldBeTrue();
            action.wasExecuted.ShouldBeTrue();
        }