public async Task OnInitializationAsync_Is_Invoked() { var mock = new MockCommand(); await mock.ExecuteAsync(); mock.OnInitializationAsyncWasInvoked.ShouldBe(true); }
public async Task OnExecuteAsync_Is_Invoked_When_No_Errors_Exist() { var mock = new MockCommand(); await mock.ExecuteAsync(); mock.OnExecuteAsyncWasInvoked.ShouldBe(true); }
public async Task OnExecuteAsyncIsInvokedWhenNoErrorsExist() { var mock = new MockCommand(); await mock.ExecuteAsync(); mock.OnExecuteAsyncWasInvoked.ShouldBe(true); }
public async Task OnExecuteAsync_Is_Not_Invoked_When_Errors_Exist() { var mock = new MockCommand { Errors = new[] { new ValidationResult("Object doesn't exist") } }; await mock.ExecuteAsync(); mock.OnExecuteAsyncWasInvoked.ShouldBe(false); }
public async Task OnExecuteAsyncIsNotInvokedWhenErrorsExist() { var mock = new MockCommand(); mock.Errors = new[] { new ValidationResult("Object doesn't exist") }; await mock.ExecuteAsync(); mock.OnExecuteAsyncWasInvoked.ShouldBe(false); }
public async Task OnInitializationAsyncIsInvoked() { var mock = new MockCommand(); await mock.ExecuteAsync(); mock.OnInitializationAsyncWasInvoked.ShouldBe(true); }