public void OnCheckBothRadioChange_Success()
 {
     MainScreenLogic.OnCheckBothRadioChange(btnCompile);
     Assert.IsTrue(Submissions.checkCode);
     Assert.IsTrue(Submissions.checkExe);
     Assert.IsTrue(btnCompile.Enabled);
 }
 public void OnMainScreenLoadTest()
 {
     MainScreenLogic.OnMainScreenLoad(menuCodeWeight, menuExeWeight, menuResultsWeight);
     Assert.IsFalse(menuResultsWeight.Enabled);
     Assert.IsFalse(menuExeWeight.Enabled);
     Assert.IsFalse(menuResultsWeight.Enabled);
 }
 public void EnableGradingCheckedChangeTest()
 {
     checkBoxEnableGrading.Checked = true;
     MainScreenLogic.EnableGradingCheckedChange(checkBoxEnableGrading, menuCodeWeight, menuExeWeight, menuResultsWeight);
     checkBoxEnableGrading.Checked = false;
     MainScreenLogic.EnableGradingCheckedChange(checkBoxEnableGrading, menuCodeWeight, menuExeWeight, menuResultsWeight);
 }
        public void OpenInputFileTest()
        {
            openInputDialog.FileName = @"..\..\..\Assets\Test Required FIles\MainScreenLogicTest\OpenInputFileFuncTest.txt";
            txtInputPath.Text        = openInputDialog.FileName;

            MainScreenLogic.OpenInputFile(openInputDialog, txtInputPath, txtOutputPath, btnAddTestCase, btnSaveIO);

            txtInputPath.Text  = @"..\..\..\Assets\Test Required FIles\MainScreenLogicTest\OpenInputFileFuncTest.txt";
            txtOutputPath.Text = @"..\..\..\Assets\Test Required FIles\MainScreenLogicTest\OpenInputFileFuncTest.txt";

            MainScreenLogic.OpenInputFile(openInputDialog, txtInputPath, txtOutputPath, btnAddTestCase, btnSaveIO);

            Assert.IsTrue(btnAddTestCase.Enabled);
            Assert.IsTrue(btnSaveIO.Enabled);
        }
 public void LimitWeightsChangeTest()
 {
     menuCodeWeight.Value = 100;
     MainScreenLogic.LimitWeightsChange(menuCodeWeight, menuExeWeight, menuResultsWeight);
     try
     {
         menuExeWeight.Value = 100;
     }
     catch
     {
         // Nothing(Dont set menuExeWeight)
     }
     MainScreenLogic.LimitWeightsChange(menuCodeWeight, menuExeWeight, menuResultsWeight);
     Assert.AreEqual(100, menuCodeWeight.Value);
     Assert.AreEqual(0, menuExeWeight.Value);
 }
        public void FormValidateTest()
        {
            //TODO
            txtArchivePath.Text = "";
            txtInputPath.Text   = "";
            txtOutputPath.Text  = "";
            Assert.AreEqual("Choose archive file to continue!", MainScreenLogic.FormValidate(txtArchivePath, txtInputPath, txtOutputPath));

            txtArchivePath.Text = "fsdgsdfghdf";
            txtInputPath.Text   = "";
            txtOutputPath.Text  = "";
            Assert.AreEqual("Choose input test case file to continue!", MainScreenLogic.FormValidate(txtArchivePath, txtInputPath, txtOutputPath));

            txtArchivePath.Text = "fsdgsdfghdf";
            txtInputPath.Text   = "ghsjhfgsydtgrfhj";
            txtOutputPath.Text  = "";
            Assert.AreEqual("Choose output test case file to continue!", MainScreenLogic.FormValidate(txtArchivePath, txtInputPath, txtOutputPath));

            txtArchivePath.Text = "fsdgsdfghdf";
            txtInputPath.Text   = "ghsjhfgsydtgrfhj";
            txtOutputPath.Text  = "hejwhfdkhtfsejhflsldjfjaslk";
            Assert.AreEqual("OK", MainScreenLogic.FormValidate(txtArchivePath, txtInputPath, txtOutputPath));
        }
Esempio n. 7
0
 private void btnCompile_Click(object sender, EventArgs e)
 {
     MainScreenLogic.CompileHelper(this.btnCompile, this.txtArchivePath, this.txtInputPath, this.txtOutputPath);
 }
Esempio n. 8
0
 private void MainScreen_HelpButtonClicked(object sender, CancelEventArgs e)
 {
     MainScreenLogic.DisplayGuideHelpBox();
 }
Esempio n. 9
0
 private void openOutputDialog_FileOk(object sender, CancelEventArgs e)
 {
     MainScreenLogic.OpenOutputFile(this.openOutputDialog, this.txtOutputPath, this.txtInputPath, this.btnAddTestCase, this.btnSaveIO);
 }
Esempio n. 10
0
 private void btnBrowseOutput_Click(object sender, EventArgs e)
 {
     MainScreenLogic.PrepareFileDialog("Text files (*.txt)|*.txt", openOutputDialog);
 }
Esempio n. 11
0
 private void btnAddTestCase_Click(object sender, EventArgs e)
 {
     MainScreenLogic.OnButtonAddTestCaseClick(this.radioTC, this.radioTNC, this.txtInputAppend, this.txtOutputAppend);
 }
Esempio n. 12
0
 private void btnDetailedResults_Click(object sender, EventArgs e)
 {
     MainScreenLogic.OnSaveDetailedResults(this.txtArchivePath);
 }
Esempio n. 13
0
 private void radioButton32BitCompiler_CheckedChanged(object sender, EventArgs e)
 {
     MainScreenLogic.Option32BitCompilerChange();
 }
Esempio n. 14
0
 private void checkBoxEnableGrading_CheckedChanged(object sender, EventArgs e)
 {
     MainScreenLogic.EnableGradingCheckedChange(this.checkBoxEnableGrading, this.menuCodeWeight, this.menuExeWeight, this.menuResultsWeight);
 }
 public void Option32BitCompilerChangeTest()
 {
     CodeChecker.use32bitCompiler = true;
     MainScreenLogic.Option32BitCompilerChange();
 }
Esempio n. 16
0
 private void btnRunProgram_Click(object sender, EventArgs e)
 {
     MainScreenLogic.RunHelper(this.btnRunProgram, this.txtArchivePath, this.txtInputPath, this.txtOutputPath, this.btnResults);
 }
Esempio n. 17
0
 private void btnResults_Click(object sender, EventArgs e)
 {
     MainScreenLogic.OnShowResults(this.dataGridResults, this.btnDetailedResults);
 }
Esempio n. 18
0
 private void timeoutNumUpDown_ValueChanged(object sender, EventArgs e)
 {
     MainScreenLogic.TimeoutValueChange(timeoutNumUpDown);
 }
Esempio n. 19
0
 private void btnSaveIO_Click(object sender, EventArgs e)
 {
     MainScreenLogic.OnButtonSaveIOClick(this.txtInputPath, this.txtOutputPath);
 }
Esempio n. 20
0
 private void radioBtnExecutable_CheckedChanged(object sender, EventArgs e)
 {
     MainScreenLogic.OnCheckCodeRadioChange(this.btnCompile);
 }
Esempio n. 21
0
 private void btnBrowseArchive_Click(object sender, EventArgs e)
 {
     MainScreenLogic.PrepareFileDialog("ZIP Archive files (*.zip)|*.zip", openArchiveDialog);
 }
Esempio n. 22
0
 private void radioBtnBothExeAndCode_CheckedChanged(object sender, EventArgs e)
 {
     MainScreenLogic.OnCheckBothRadioChange(this.btnCompile);
 }
Esempio n. 23
0
 private void openArchiveDialog_FileOk(object sender, CancelEventArgs e)
 {
     MainScreenLogic.OpenArchiveFile(this.openArchiveDialog, this.txtArchivePath, this.btnResults, this.btnDetailedResults);
 }
Esempio n. 24
0
 private void btnExportCSV_Click(object sender, EventArgs e)
 {
     MainScreenLogic.OnExportToCSV(saveCSVFile, dataGridResults);
 }
Esempio n. 25
0
 private void menuCodeWeight_ValueChanged(object sender, EventArgs e)
 {
     MainScreenLogic.LimitWeightsChange(this.menuCodeWeight, this.menuExeWeight, this.menuResultsWeight);
 }
Esempio n. 26
0
 private void MainScreen_Load(object sender, EventArgs e)
 {
     MainScreenLogic.OnMainScreenLoad(this.menuCodeWeight, this.menuExeWeight, this.menuResultsWeight);
 }