public void TestCreateGetProcessedSevisBatchIdsForDeletionQuery_SevisBatchIsAfterCutoffDate() { var cutOffDate = DateTime.UtcNow; var batch = new SevisBatchProcessing { Id = 1, RetrieveDate = cutOffDate.AddDays(1.0), DownloadDispositionCode = DispositionCode.Success.Code, UploadDispositionCode = DispositionCode.Success.Code, ProcessDispositionCode = DispositionCode.Success.Code }; context.SevisBatchProcessings.Add(batch); var results = SevisBatchProcessingQueries.CreateGetProcessedSevisBatchIdsForDeletionQuery(context, cutOffDate); Assert.AreEqual(0, results.Count()); }
public void TestCreateGetProcessedSevisBatchIdsForDeletionQuery_HasSuccessfulUploadAndDownload_HasBusinessValidationProcessCode() { var cutOffDate = DateTime.UtcNow; var batch = new SevisBatchProcessing { Id = 1, RetrieveDate = cutOffDate.AddDays(-1.0), DownloadDispositionCode = DispositionCode.Success.Code, UploadDispositionCode = DispositionCode.Success.Code, ProcessDispositionCode = DispositionCode.BusinessRuleViolations.Code }; context.SevisBatchProcessings.Add(batch); var results = SevisBatchProcessingQueries.CreateGetProcessedSevisBatchIdsForDeletionQuery(context, cutOffDate); Assert.AreEqual(1, results.Count()); Assert.AreEqual(batch.Id, results.First()); }