Esempio n. 1
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);
        }