public void when_closed_action_is_executed() { var supportClose = new SupportClosing(); var result = false; supportClose.ExecuteOnClosed(() => result = true); supportClose.ClosingStrategy.Close(); Assert.That(result, Is.True); }
public void when_parent_closes_then_the_child_closes() { var parent = new SupportClosing(); var child = new SupportClosing(); var result = false; child.ExecuteOnClosed(() => result = true); child.SyncViewModelClose(parent); parent.ClosingStrategy.Close(); Assert.That(result, Is.True); }