private async Task ValidateDataLockError(Table table, Provider provider) { var dataLockErrors = table.CreateSet <DataLockError>().ToList(); foreach (var dataLockError in dataLockErrors) { if (string.IsNullOrWhiteSpace(dataLockError.Apprenticeship)) { continue; } var apprenticeship = Apprenticeships.FirstOrDefault(a => a.Identifier == dataLockError.Apprenticeship) ?? throw new Exception($"Can't find a matching apprenticeship for Identifier {dataLockError.Apprenticeship}"); dataLockError.ApprenticeshipId = apprenticeship.ApprenticeshipId; } var matcher = new EarningFailedDataLockMatcher(provider, TestSession, CurrentCollectionPeriod, dataLockErrors); await WaitForIt(() => matcher.MatchPayments(), "DataLock Failed event check failure"); }
public async Task ThenDLOCK_IsNotFlagged() { var matcher = new EarningFailedDataLockMatcher(TestSession.Provider, TestSession, CurrentCollectionPeriod, new List <DataLockError>()); await WaitForUnexpected(() => matcher.MatchUnexpectedEvents(), "DataLock Event check failure").ConfigureAwait(false); }