Exemplo n.º 1
0
        public void ZipArchiveHandler_Success()
        {
            string filePath = @"..\..\..\Assets\Test Required FIles\ZipArchiveHandlerTest\ZipForTest.zip";

            ZipArchiveHandler.GetSubmissionData(filePath, true);
            Assert.IsTrue(File.Exists(@"..\..\..\Assets\Test Required FIles\ZipArchiveHandlerTest\Codes To Check\איימן שפסו_7085_assignsubmission_file_\Q3 .c"));
            Assert.IsTrue(File.Exists(@"..\..\..\Assets\Test Required FIles\ZipArchiveHandlerTest\Codes To Check\אחמד סכראן_7092_assignsubmission_file_\mtla3.c"));
            Assert.IsTrue(File.Exists(@"..\..\..\Assets\Test Required FIles\ZipArchiveHandlerTest\Codes To Check\אחמד סכראן_7092_assignsubmission_file_\code files\erl.h"));
            Assert.IsTrue(File.Exists(@"..\..\..\Assets\Test Required FIles\ZipArchiveHandlerTest\Codes To Check\אחמד סכראן_7092_assignsubmission_file_\code files\Targil5a.c"));
            Assert.IsTrue(File.Exists(@"..\..\..\Assets\Test Required FIles\ZipArchiveHandlerTest\Codes To Check\אחמד סכראן_7092_assignsubmission_file_\Exe\Source.exe"));
        }
Exemplo n.º 2
0
 public static void OpenArchiveFile(OpenFileDialog openArchiveDialog, TextBox txtArchivePath, Button btnResults, Button btnDetailedResults)
 {
     try
     {
         string zipFile = openArchiveDialog.FileName;
         txtArchivePath.Text = zipFile;
         Submissions.ResetSubmissions();
         btnResults.Enabled         = false;
         btnDetailedResults.Enabled = false;
         ZipArchiveHandler.GetSubmissionData(zipFile, true); //Extract submissions data.
     }
     catch (Exception ex)
     {
         txtArchivePath.Text = "";
         MessageBox.Show(ex.Message);
     }
 }