Example #1
0
        public Given_Cookie_Does_Not_Already_Exist()
        {
            CookieRepository = new Mock <ICookieStorageService <EmployerAccountData> >();

            CookieRepository
            .Setup(
                m =>
                m.Get(It.IsAny <string>()))
            .Returns((EmployerAccountData)null);

            _sut = new EmployerAccounts.Commands.PayeRefData.CookieBasedPayeRefDataSaver(CookieRepository.Object);
        }
Example #2
0
        public Given_Cookie_Does_Already_Exist()
        {
            setupOrganisationData();

            CookieRepository = new Mock <ICookieStorageService <EmployerAccountData> >();

            CookieRepository
            .Setup(
                m =>
                m.Get(It.IsAny <string>()))
            .Returns(
                new EmployerAccountData
            {
                EmployerAccountOrganisationData = _organisationData,
                EmployerAccountPayeRefData      = new EmployerAccountPayeRefData()
            });

            _sut = new EmployerAccounts.Commands.PayeRefData.CookieBasedPayeRefDataSaver(CookieRepository.Object);
        }