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));
        }
示例#7
0
 private void btnCompile_Click(object sender, EventArgs e)
 {
     MainScreenLogic.CompileHelper(this.btnCompile, this.txtArchivePath, this.txtInputPath, this.txtOutputPath);
 }
示例#8
0
 private void MainScreen_HelpButtonClicked(object sender, CancelEventArgs e)
 {
     MainScreenLogic.DisplayGuideHelpBox();
 }
示例#9
0
 private void openOutputDialog_FileOk(object sender, CancelEventArgs e)
 {
     MainScreenLogic.OpenOutputFile(this.openOutputDialog, this.txtOutputPath, this.txtInputPath, this.btnAddTestCase, this.btnSaveIO);
 }
示例#10
0
 private void btnBrowseOutput_Click(object sender, EventArgs e)
 {
     MainScreenLogic.PrepareFileDialog("Text files (*.txt)|*.txt", openOutputDialog);
 }
示例#11
0
 private void btnAddTestCase_Click(object sender, EventArgs e)
 {
     MainScreenLogic.OnButtonAddTestCaseClick(this.radioTC, this.radioTNC, this.txtInputAppend, this.txtOutputAppend);
 }
示例#12
0
 private void btnDetailedResults_Click(object sender, EventArgs e)
 {
     MainScreenLogic.OnSaveDetailedResults(this.txtArchivePath);
 }
示例#13
0
 private void radioButton32BitCompiler_CheckedChanged(object sender, EventArgs e)
 {
     MainScreenLogic.Option32BitCompilerChange();
 }
示例#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();
 }
示例#16
0
 private void btnRunProgram_Click(object sender, EventArgs e)
 {
     MainScreenLogic.RunHelper(this.btnRunProgram, this.txtArchivePath, this.txtInputPath, this.txtOutputPath, this.btnResults);
 }
示例#17
0
 private void btnResults_Click(object sender, EventArgs e)
 {
     MainScreenLogic.OnShowResults(this.dataGridResults, this.btnDetailedResults);
 }
示例#18
0
 private void timeoutNumUpDown_ValueChanged(object sender, EventArgs e)
 {
     MainScreenLogic.TimeoutValueChange(timeoutNumUpDown);
 }
示例#19
0
 private void btnSaveIO_Click(object sender, EventArgs e)
 {
     MainScreenLogic.OnButtonSaveIOClick(this.txtInputPath, this.txtOutputPath);
 }
示例#20
0
 private void radioBtnExecutable_CheckedChanged(object sender, EventArgs e)
 {
     MainScreenLogic.OnCheckCodeRadioChange(this.btnCompile);
 }
示例#21
0
 private void btnBrowseArchive_Click(object sender, EventArgs e)
 {
     MainScreenLogic.PrepareFileDialog("ZIP Archive files (*.zip)|*.zip", openArchiveDialog);
 }
示例#22
0
 private void radioBtnBothExeAndCode_CheckedChanged(object sender, EventArgs e)
 {
     MainScreenLogic.OnCheckBothRadioChange(this.btnCompile);
 }
示例#23
0
 private void openArchiveDialog_FileOk(object sender, CancelEventArgs e)
 {
     MainScreenLogic.OpenArchiveFile(this.openArchiveDialog, this.txtArchivePath, this.btnResults, this.btnDetailedResults);
 }
示例#24
0
 private void btnExportCSV_Click(object sender, EventArgs e)
 {
     MainScreenLogic.OnExportToCSV(saveCSVFile, dataGridResults);
 }
示例#25
0
 private void menuCodeWeight_ValueChanged(object sender, EventArgs e)
 {
     MainScreenLogic.LimitWeightsChange(this.menuCodeWeight, this.menuExeWeight, this.menuResultsWeight);
 }
示例#26
0
 private void MainScreen_Load(object sender, EventArgs e)
 {
     MainScreenLogic.OnMainScreenLoad(this.menuCodeWeight, this.menuExeWeight, this.menuResultsWeight);
 }