Ejemplo n.º 1
0
 public void GetLojackAuditProcessTest()
 {
     var rep = new LojackAuditProcessRepository(new LojackContext());
     var audit = new LojackAuditProcess
     {
         FileName = "test.csv",
         ModificationDate = DateTime.Now,
         ProcessDateTime = DateTime.Now,
         RecordsProcessed = 10,
         TotalRecords = 100,
         Status = "Tested"
     };
     var record = rep.Insert(audit);
     var found = rep.FindByFileName(record.FileName);
     Assert.IsTrue(found);
     found = rep.FindByFileName("notfound.csv");
     Assert.IsFalse(found);
 }
Ejemplo n.º 2
0
 public void ProcessImportFiles(IEnumerable<string> files, List<string> existingComputraceIDs, SqlConnection conn,
     List<string> blacklistedSerials)
 {
     var rep = new LojackAuditProcessRepository(new LojackContext());
     foreach (string file in files)
     {
         if (rep.FindByFileName(file))
         {
             var counter = ProcessImportFile(existingComputraceIDs, conn, blacklistedSerials, file);
             InsertLojackAuditRecord(file, counter, TotalRecords);
         }
     }
 }