public void Constructor_PredicateConditionsAreNotMet_CommandDoesNotExecute() { int num = 4; CommandRelay relay = new CommandRelay((x) => SomeMethodThatDoesSomething(), (y) => (int)y > 5); Assert.IsFalse(relay.CanExecute(num)); }
public void Constructor_PredicateIsNull_CommandExecutes() { CommandRelay relay = new CommandRelay((x) => SomeMethodThatDoesSomething(), null); Assert.IsTrue(relay.CanExecute(new object())); }
public void Constructor_ActionIsNull_CommandDoesNotExecute() { CommandRelay relay = new CommandRelay(null); Assert.IsFalse(relay.CanExecute(new object())); }