public void Constructor_Should_Not_Throw_When_When_Is_Null() { Action <ExampleViewModel> someAction = Some.Action <ExampleViewModel>(); Predicate <ExampleViewModel> nullWhenPredicate = null; MoreAssert.DoesNotThrow( () => new Command <ExampleViewModel>(someAction, nullWhenPredicate)); }
public void CanExecute_Shoud_Return_True_When_When_Predicate_Is_Not_Provided() { Action <ExampleViewModel> someAction = Some.Action <ExampleViewModel>(); Predicate <ExampleViewModel> nullWhenPredicate = null; ICommand command = new Command <ExampleViewModel>(someAction, nullWhenPredicate); ExampleViewModel someViewModel = Some.ExampleViewModel; bool canExecute = command.CanExecute(someViewModel); Assert.True(canExecute); }