Exemplo n.º 1
0
 private void buttonNonCoop_Click(object sender, EventArgs e)
 {
     nonCoopForm = new NonCoopForm();
     this.Hide();
     nonCoopForm.ShowDialog();
     // When new form DioalogResult = ok
     this.Show();
 }
        public void InputNonCoopTest()
        {
            //(numericPlayer.Value == 0 || textBoxProduct.Text == "" || richTextBoxMaterials.Text == "")
            NonCoopForm nonCoopTest = new NonCoopForm();

            nonCoopTest.NoPTB.Text = "";
            nonCoopTest.InvestmentTB.Text = "";
            nonCoopTest.MultiTB.Text = "";
            nonCoopTest.RuleParamTB.Text = "";
            nonCoopTest.GraphTypeCB.Text = "";
            Assert.IsFalse(nonCoopTest.checkParams());

            nonCoopTest.NoPTB.Text = "30";
            Assert.IsFalse(nonCoopTest.checkParams());

            nonCoopTest.InvestmentTB.Text = "10";
            Assert.IsFalse(nonCoopTest.checkParams());

            nonCoopTest.MultiTB.Text = "5";
            Assert.IsFalse(nonCoopTest.checkParams());

            nonCoopTest.RuleParamTB.Text = "75";
            Assert.IsFalse(nonCoopTest.checkParams());

            nonCoopTest.GraphTypeCB.Text = "Random Graph";
            Assert.IsTrue(nonCoopTest.checkParams());
        }