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