public void CanExceute_ReturnsCanExecuteFunctionResult() { Setup(withCanExecutePredicate: true, canExecuteResult: false); Assert.IsFalse(Behavior.CanExecute(Context, null)); Setup(withCanExecutePredicate: true, canExecuteResult: true); Assert.IsTrue(Behavior.CanExecute(Context, null)); }
public void CanExecute_CallsCanExecutePredicateWithSourceObject() { Setup(withCanExecutePredicate: true); Next.SourceObject = new SourceObject(); Behavior.CanExecute(Context, null); Assert.AreEqual(Next.SourceObject, LastCanExecuteInvocation.SourceObject); }
public void CanExecute_ReturnsTrueWithoutCanExecuteFunction() { Setup(withCanExecutePredicate: false); Assert.IsTrue(Behavior.CanExecute(Context, null)); }