public void TestCreateGetSevisBatchProcessingDTOsToUploadQuery_DoesNotHaveSubmitDate() { var model = new SevisBatchProcessing { BatchId = "batch id", DownloadDispositionCode = "download code", Id = 1, ProcessDispositionCode = "process code", RetrieveDate = DateTimeOffset.UtcNow.AddDays(1.0), SendString = "send string", SubmitDate = null, TransactionLogString = "transaction log", UploadDispositionCode = "upload code" }; context.SevisBatchProcessings.Add(model); var results = SevisBatchProcessingQueries.CreateGetSevisBatchProcessingDTOQuery(context).ToList(); Assert.AreEqual(1, results.Count); var firstResult = results.First(); Assert.AreEqual(model.BatchId, firstResult.BatchId); }
public void TestCreateGetSevisBatchProcessingDTOQuery() { var model = new SevisBatchProcessing { BatchId = "batch id", DownloadDispositionCode = "download code", Id = 1, ProcessDispositionCode = "process code", RetrieveDate = DateTimeOffset.UtcNow.AddDays(1.0), SendString = "send string", SubmitDate = DateTimeOffset.UtcNow.AddDays(2.0), TransactionLogString = "transaction log", UploadDispositionCode = "upload code", SevisUsername = "******", SevisOrgId = "org", UploadTries = 1, DownloadTries = 2, LastUploadTry = DateTimeOffset.UtcNow.AddDays(-10.0), LastDownloadTry = DateTimeOffset.UtcNow.AddDays(-5.0) }; context.SevisBatchProcessings.Add(model); var results = SevisBatchProcessingQueries.CreateGetSevisBatchProcessingDTOQuery(context).ToList(); Assert.AreEqual(1, results.Count); var firstResult = results.First(); Assert.AreEqual(model.BatchId, firstResult.BatchId); Assert.AreEqual(model.DownloadDispositionCode, firstResult.DownloadDispositionCode); Assert.AreEqual(model.Id, firstResult.Id); Assert.AreEqual(model.ProcessDispositionCode, firstResult.ProcessDispositionCode); Assert.AreEqual(model.RetrieveDate, firstResult.RetrieveDate); Assert.AreEqual(model.SendString, firstResult.SendString); Assert.AreEqual(model.SubmitDate, firstResult.SubmitDate); Assert.AreEqual(model.TransactionLogString, firstResult.TransactionLogString); Assert.AreEqual(model.UploadDispositionCode, firstResult.UploadDispositionCode); Assert.AreEqual(model.SevisUsername, firstResult.SevisUsername); Assert.AreEqual(model.SevisOrgId, firstResult.SevisOrgId); Assert.AreEqual(model.UploadTries, firstResult.UploadTries); Assert.AreEqual(model.DownloadTries, firstResult.DownloadTries); Assert.AreEqual(model.LastUploadTry, firstResult.LastUploadTry); Assert.AreEqual(model.LastDownloadTry, firstResult.LastDownloadTry); }