public void EnsureMethodInvocationsForGetByIDCommand() { var service = new ServiceBaseMock(new PersonProxyStub()); var result = service.GetByIDCommand(1).Execute(); service.OnGetByIDCommandInitializationWasInvoked.ShouldBe(true); service.GetValidationResultsForGetByIDWasInvoked.ShouldBe(true); service.GetBusinessRulesForGetByIDWasInvoked.ShouldBe(true); service.GetAllErrorsForGetByIDWasInvoked.ShouldBe(true); service.GetByIDWasInvoked.ShouldBe(true); }
public async Task Ensure_Method_Invocations_For_GetByIDCommandAsync() { var service = new ServiceBaseMock(new PersonProxyStub()); await service.GetByIDCommand(1).ExecuteAsync(); service.OnGetByIDCommandInitializationAsyncWasInvoked.ShouldBe(true); service.GetValidationResultsForGetByIDWasInvoked.ShouldBe(true); service.GetBusinessRulesForGetByIDAsyncWasInvoked.ShouldBe(true); service.GetAllErrorsForGetByIDAsyncWasInvoked.ShouldBe(true); service.GetByIDAsyncWasInvoked.ShouldBe(true); }