public EmployerAgreementControllerTestFixtures WithAgreementIdSignedAs(bool isSigned)
        {
            EmployerAgreementService.Setup(x => x.IsAgreementSigned(It.IsAny <long>(), It.IsAny <long>(),
                                                                    It.IsAny <AgreementFeature[]>()))
            .ReturnsAsync(isSigned);

            return(this);
        }
        public EmployerAgreementServiceTestsFixture()
        {
            LegalEntityViewModel            = new LegalEntityViewModel();
            LegalEntityViewModel.Agreements = new List <AgreementViewModel>();

            AccountLegalEntityResponse = new AccountLegalEntityResponse();
            AccountLegalEntityResponse.MaLegalEntityId = MaLegalEntityId;

            EncodingService = new Mock <IEncodingService>();
            EncodingService.Setup(x => x.Encode(It.IsAny <long>(), EncodingType.AccountId)).Returns((long x, EncodingType t) => $"X{x}X");

            AccountApiClient = new Mock <IAccountApiClient>();
            AccountApiClient.Setup(x => x.GetLegalEntity(It.IsAny <string>(), It.IsAny <long>())).ReturnsAsync(LegalEntityViewModel);


            Sut = new EmployerAgreementService(AccountApiClient.Object, EncodingService.Object, Mock.Of <ILogger <EmployerAgreementService> >());
        }
 public void VerifyGetLatestAgreementCalledCorrectly()
 {
     EmployerAgreementService.Verify(x => x.GetLatestAgreementId(AccountLegalEntity.AccountId,
                                                                 AccountLegalEntity.MaLegalEntityId));
 }
 public void VerifyIsAgreementSignedCalledCorrectly()
 {
     EmployerAgreementService.Verify(x => x.IsAgreementSigned(AccountLegalEntity.AccountId,
                                                              AccountLegalEntity.MaLegalEntityId, AgreementSignedRequest.AgreementFeatures));
 }