public void SetUp() { _mockCommitmentRespository = new Mock <ICommitmentRepository>(); _mockValidator = new Mock <AbstractValidator <GetCommitmentAgreementsRequest> >(); _handler = new GetCommitmentAgreementsQueryHandler(_mockCommitmentRespository.Object, _mockValidator.Object); _mockValidator.Setup(v => v.Validate(It.IsAny <GetCommitmentAgreementsRequest>())) .Returns(new ValidationResult(Enumerable.Empty <ValidationFailure>())); _exampleValidRequest = new GetCommitmentAgreementsRequest { Caller = new Caller { CallerType = CallerType.Provider, Id = 1 } }; }
public void WhenGettingCommitmentAgreementsSetup() { _commitmentsApi = new Mock <IProviderCommitmentsApi>(); _handler = new GetCommitmentAgreementsQueryHandler(_commitmentsApi.Object); }