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); }
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(); }