Exemplo 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);
        }
Exemplo n.º 2
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;
        }