public async Task Ensure_Method_Invocations_For_DeleteCommandAsync() { var service = new ServiceBaseMock(new PersonProxyStub()); await service.DeleteCommand(1).ExecuteAsync(); service.OnDeleteCommandInitializationAsyncWasInvoked.ShouldBe(true); service.GetValidationResultsForDeleteWasInvoked.ShouldBe(true); service.GetBusinessRulesForDeleteAsyncWasInvoked.ShouldBe(true); service.GetAllErrorsForDeleteAsyncWasInvoked.ShouldBe(true); service.DeleteAsyncWasInvoked.ShouldBe(true); }
public void EnsureMethodInvocationsForDelete() { var service = new ServiceBaseMock(new PersonProxyStub()); var result = service.DeleteCommand(1).Execute(); service.OnDeleteCommandInitializationWasInvoked.ShouldBe(true); service.GetValidationResultsForDeleteWasInvoked.ShouldBe(true); service.GetBusinessRulesForDeleteWasInvoked.ShouldBe(true); service.GetAllErrorsForDeleteWasInvoked.ShouldBe(true); service.DeleteWasInvoked.ShouldBe(true); }