public async Task ThenResponseShouldHaveAccountAgreementTypeSetToTheLatestAgreementType()
        {
            //Arrange
            AccountAgreementType agreementType     = AccountAgreementType.Combined;
            const string         hashedAgreementId = "ABC123";

            //Act
            var result = await _orchestrator.GetAccount(hashedAgreementId);

            //Assert
            Assert.AreEqual(agreementType, result.AccountAgreementType);
        }
        private bool IsAccountAllowedPaymentOnService(AccountAgreementType accountAgreementType, ApprenticeshipEmployerType apprenticeshipEmployerType, bool?levyOverride)
        {
            if (levyOverride.HasValue)
            {
                return(levyOverride.Value);
            }

            if (accountAgreementType == AccountAgreementType.Unknown)
            {
                return(false);
            }

            if (accountAgreementType == AccountAgreementType.NonLevyExpressionOfInterest || accountAgreementType == AccountAgreementType.Combined)
            {
                return(true);
            }

            return(apprenticeshipEmployerType == ApprenticeshipEmployerType.Levy);
        }
        public void ShowYourFundingReservationsLink_GivenValues_ReturnsExpectedResult(
            ApprenticeshipEmployerType apprenticeshipEmployerType,
            AccountAgreementType agreementType,
            bool expectedValue)
        {
            // Arrange
            var model = new AccountDashboardViewModel
            {
                ApprenticeshipEmployerType = apprenticeshipEmployerType,
                AgreementInfo = new AgreementInfoViewModel
                {
                    Type = agreementType
                }
            };

            // Act
            var result = AccountDashboardViewModelExtensions.ShowYourFundingReservationsLink(model);

            // Assert
            Assert.AreEqual(expectedValue, result);
        }
Ejemplo n.º 4
0
 public EmployerAccountDetails(AccountAgreementType accountAgreementType, string apprenticeshipEmployerType)
 {
     AccountAgreementType       = accountAgreementType;
     ApprenticeshipEmployerType = apprenticeshipEmployerType;
 }