public void Ensure_Method_Invocations_For_Update() { var service = new ServiceBaseMock(new PersonProxyStub()); var result = service.UpdateCommand(new Person()).Execute(); service.OnUpdateCommandInitializationWasInvoked.ShouldBe(true); service.GetValidationResultsForUpdateWasInvoked.ShouldBe(true); service.GetBusinessRulesForUpdateWasInvoked.ShouldBe(true); service.GetAllErrorsForUpdateWasInvoked.ShouldBe(true); service.UpdateWasInvoked.ShouldBe(true); }
public async Task EnsureMethodInvocationsForUpdateCommandAsync() { var service = new ServiceBaseMock(new PersonProxyStub()); await service.UpdateCommand(new Person()).ExecuteAsync(); service.OnUpdateCommandInitializationAsyncWasInvoked.ShouldBe(true); service.GetValidationResultsForUpdateWasInvoked.ShouldBe(true); service.GetBusinessRulesForUpdateAsyncWasInvoked.ShouldBe(true); service.GetAllErrorsForUpdateAsyncWasInvoked.ShouldBe(true); service.UpdateAsyncWasInvoked.ShouldBe(true); }