private bool payeRefDataIsUnchanged(EmployerAccountPayeRefData data)
        {
            data.AccessToken.Should().Be(_payeRefData.AccessToken);
            data.EmpRefNotFound.Should().Be(_payeRefData.EmpRefNotFound);
            data.EmployerRefName.Should().Be(_payeRefData.EmployerRefName);
            data.PayeReference.Should().Be(_payeRefData.PayeReference);
            data.RefreshToken.Should().Be(_payeRefData.RefreshToken);

            return(true);
        }
 private void setupPayeRefData()
 {
     _payeRefData = new EmployerAccountPayeRefData
     {
         AccessToken     = @"{FBC24A46-AC40-4477-8D7E-9A514C0F4AAE}",
         EmployerRefName = @"{64439F80-CE0A-4E7E-924A-57B4420EF4FF}",
         EmpRefNotFound  = false,
         PayeReference   = @"{74988389-DBED-4996-9576-7F61426585CB}",
         RefreshToken    = @"{0994787F-6890-41B5-9F67-FCF6D036FF7A}"
     };
 }
Beispiel #3
0
 private void createNewCookieWithData(EmployerAccountPayeRefData payeRefData)
 {
     _cookieRepository
     .Create(
         new EmployerAccountData
     {
         EmployerAccountOrganisationData = new EmployerAccountOrganisationData(),
         EmployerAccountPayeRefData      = payeRefData
     },
         CookieName,
         CookieExpiryInDays);
 }
 public SavePayeRefData(EmployerAccountPayeRefData payeRefData)
 {
     PayeRefData = payeRefData ?? throw new ArgumentNullException(nameof(payeRefData));
 }
 public SaveOrganisationAndPayeData(EmployerAccountOrganisationData organisationData, EmployerAccountPayeRefData payeRefData)
 {
     OrganisationData = organisationData ?? throw new ArgumentNullException(nameof(organisationData));
     PayeRefData      = payeRefData ?? throw new ArgumentNullException(nameof(payeRefData));
 }
Beispiel #6
0
        private void updateExistingCookieWithNewData(EmployerAccountData existingCookie,
                                                     EmployerAccountOrganisationData organisationData, EmployerAccountPayeRefData payeRefData)
        {
            existingCookie.EmployerAccountOrganisationData = organisationData;
            existingCookie.EmployerAccountPayeRefData      = payeRefData;

            _cookieRepository
            .Update(
                CookieName,
                existingCookie);
        }