private async Task <bool> IsDatabaseInExpectedState()
        {
            var lastProcessedEventId = await EventTestsRepository.GetLastProcessedEventId <string>(EventName);

            if (lastProcessedEventId != "3")
            {
                return(false);
            }

            var numberOfDataLockEvents = await EventTestsRepository.GetNumberOfDataLockEvents();

            if (numberOfDataLockEvents != 3)
            {
                return(false);
            }

            var numberOfDataLockErrors = await EventTestsRepository.GetNumberOfDataLockErrors();

            if (numberOfDataLockErrors != 6)
            {
                return(false);
            }

            return(true);
        }
Example #2
0
        private async Task <bool> IsDatabaseInExpectedState()
        {
            var lastProcessedEventId = await EventTestsRepository.GetLastProcessedEventId <long>(EventName);

            if (lastProcessedEventId != 4)
            {
                return(false);
            }

            var numberOfRegistrations = await EventTestsRepository.GetNumberOfAccounts();

            if (numberOfRegistrations != 2)
            {
                return(false);
            }

            var numberOfLegalEntities = await EventTestsRepository.GetNumberOfLegalEntities();

            if (numberOfLegalEntities != 3)
            {
                return(false);
            }

            var numberOfPayeSchemes = await EventTestsRepository.GetNumberOfPayeSchemes();

            if (numberOfPayeSchemes != 3)
            {
                return(false);
            }

            return(true);
        }
Example #3
0
        private async Task<bool> IsDatabaseInExpectedState()
        {
            var lastProcessedEventId = await EventTestsRepository.GetLastProcessedEventId<long>(EventName);
            if (lastProcessedEventId != 4)
            {
                return false;
            }

            var numberOfAccounts = await EventTestsRepository.GetNumberOfAccounts();
            if (numberOfAccounts != 2)
            {
                return false;
            }

            return true;
        }
        private async Task <bool> IsDatabaseInExpectedState()
        {
            var lastProcessedEventId = await EventTestsRepository.GetLastProcessedEventId <long>(EventName);

            if (lastProcessedEventId != 4)
            {
                return(false);
            }

            var numberOfLevyDeclarations = await EventTestsRepository.GetNumberOfLevyDeclarations();

            if (numberOfLevyDeclarations != 3)
            {
                return(false);
            }

            return(true);
        }
Example #5
0
        private async Task <bool> IsDatabaseInExpectedState()
        {
            var lastProcessedEventId = await EventTestsRepository.GetLastProcessedEventId <string>("PeriodEnd-Payment");

            if (lastProcessedEventId != "PERIOD4")
            {
                return(false);
            }

            var numberOfPayments = await EventTestsRepository.GetNumberOfPayments();

            if (numberOfPayments != 7)
            {
                return(false);
            }

            return(true);
        }
Example #6
0
        private async Task <bool> IsDatabaseInExpectedState()
        {
            var lastProcessedEventId = await EventTestsRepository.GetLastProcessedEventId <long>("ApprenticeshipEventView");

            if (lastProcessedEventId != 4)
            {
                return(false);
            }

            var numberOfRegistrations = await EventTestsRepository.GetNumberOfApprenticeships();

            if (numberOfRegistrations != 2)
            {
                return(false);
            }

            return(true);
        }
Example #7
0
        private async Task <bool> IsDatabaseInExpectedState()
        {
            var lastProcessedEventId = await EventTestsRepository.GetLastProcessedEventId <long>("EmploymentCheckCompleteEvent");

            if (lastProcessedEventId != 4)
            {
                return(false);
            }

            var numberOfEmploymentChecks = await EventTestsRepository.GetNumberOfEmploymentChecks();

            if (numberOfEmploymentChecks != 2)
            {
                return(false);
            }

            return(true);
        }
 private async Task <bool> PeriodEndProcessed()
 {
     return(await EventTestsRepository.GetLastProcessedEventId <string>("PeriodEnd-AccountTransfer") == "PERIOD4");
 }