Exemplo n.º 1
0
        public void RandomNumTest()
        {
            Form1_Accessor target = new Form1_Accessor(); // TODO: 初始化为适当的值

            target.RandomNum();
            Assert.Inconclusive("无法验证不返回值的方法。");
        }
Exemplo n.º 2
0
        public void InitializeComponentTest()
        {
            Form1_Accessor target = new Form1_Accessor(); // TODO: 初始化为适当的值

            target.InitializeComponent();
            Assert.Inconclusive("无法验证不返回值的方法。");
        }
Exemplo n.º 3
0
        public void InitializeComponentTest()
        {
            Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value

            target.InitializeComponent();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Exemplo n.º 4
0
 public void ChangePanelColorToBlackTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     Panel p = null; // TODO: Initialize to an appropriate value
     target.ChangePanelColorToBlack(p);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemplo n.º 5
0
 public void DisposeTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     bool disposing = false; // TODO: Initialize to an appropriate value
     target.Dispose(disposing);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemplo n.º 6
0
 public void OnLoadTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     EventArgs e = null; // TODO: Initialize to an appropriate value
     target.OnLoad(e);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemplo n.º 7
0
 public void AddLineTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     string theText = string.Empty; // TODO: Initialize to an appropriate value
     target.AddLine(theText);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemplo n.º 8
0
        public void DisposeTest()
        {
            Form1_Accessor target    = new Form1_Accessor(); // TODO: 初始化为适当的值
            bool           disposing = false;                // TODO: 初始化为适当的值

            target.Dispose(disposing);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }
Exemplo n.º 9
0
        public void DisposeTest()
        {
            Form1_Accessor target    = new Form1_Accessor(); // TODO: Initialize to an appropriate value
            bool           disposing = false;                // TODO: Initialize to an appropriate value

            target.Dispose(disposing);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Exemplo n.º 10
0
        public void GameLoopTest()
        {
            Form1_Accessor target      = new Form1_Accessor(); // TODO: Initialize to an appropriate value
            double         elapsedTime = 0F;                   // TODO: Initialize to an appropriate value

            target.GameLoop(elapsedTime);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Exemplo n.º 11
0
 public void button2_ClickTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: 初始化为适当的值
     object sender = null; // TODO: 初始化为适当的值
     EventArgs e = null; // TODO: 初始化为适当的值
     target.button2_Click(sender, e);
     Assert.Inconclusive("无法验证不返回值的方法。");
 }
Exemplo n.º 12
0
 public void btnsave_ClickTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     object sender = null; // TODO: Initialize to an appropriate value
     EventArgs e = null; // TODO: Initialize to an appropriate value
     target.btnsave_Click(sender, e);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemplo n.º 13
0
        public void _openGLControl_PaintTest()
        {
            Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
            object         sender = null;                 // TODO: Initialize to an appropriate value
            PaintEventArgs e      = null;                 // TODO: Initialize to an appropriate value

            target._openGLControl_Paint(sender, e);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Exemplo n.º 14
0
        public void Form1_ScannedTest()
        {
            Form1_Accessor target = new Form1_Accessor(); // TODO: инициализация подходящего значения
            object         sender = null;                 // TODO: инициализация подходящего значения
            EventArgs      ev     = null;                 // TODO: инициализация подходящего значения

            target.Form1_Scanned(sender, ev);
            Assert.Inconclusive("Невозможно проверить метод, не возвращающий значение.");
        }
Exemplo n.º 15
0
        public void linkLabel2_LinkClickedTest()
        {
            Form1_Accessor target           = new Form1_Accessor(); // TODO: Initialize to an appropriate value
            object         sender           = null;                 // TODO: Initialize to an appropriate value
            LinkLabelLinkClickedEventArgs e = null;                 // TODO: Initialize to an appropriate value

            target.linkLabel2_LinkClicked(sender, e);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Exemplo n.º 16
0
        public void button1_ClickTest()
        {
            Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
            object         sender = null;                 // TODO: Initialize to an appropriate value
            EventArgs      e      = null;                 // TODO: Initialize to an appropriate value

            target.button1_Click(sender, e);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Exemplo n.º 17
0
        public void button6_KeyDownTest()
        {
            Form1_Accessor target = new Form1_Accessor(); // TODO: 初始化为适当的值
            object         sender = null;                 // TODO: 初始化为适当的值
            KeyEventArgs   e      = null;                 // TODO: 初始化为适当的值

            target.button6_KeyDown(sender, e);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }
Exemplo n.º 18
0
        public void Form1_LoadTest()
        {
            Form1_Accessor target = new Form1_Accessor(); // TODO: 初始化为适当的值
            object         sender = null;                 // TODO: 初始化为适当的值
            EventArgs      e      = null;                 // TODO: 初始化为适当的值

            target.Form1_Load(sender, e);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }
Exemplo n.º 19
0
 public void IsNumericTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: 適切な値に初期化してください
     Assert.AreEqual(true, target.IsNumeric("1"));
     Assert.AreEqual(true, target.IsNumeric("9"));
     Assert.AreEqual(false, target.IsNumeric("-"));
     Assert.AreEqual(false, target.IsNumeric("."));
     Assert.AreEqual(false, target.IsNumeric("a"));
     Assert.AreEqual(false, target.IsNumeric("あ"));
 }
Exemplo n.º 20
0
        public void AddNumbersTest()
        {
            Form1_Accessor target   = new Form1_Accessor(); // TODO: Initialize to an appropriate value
            double         iOne     = 2;                    // TODO: Initialize to an appropriate value
            double         iTwo     = 3;                    // TODO: Initialize to an appropriate value
            double         expected = 5F;                   // TODO: Initialize to an appropriate value
            double         actual;

            actual = target.AddNumbers(iOne, iTwo);
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 21
0
        public void CalcTest()
        {
            Form1_Accessor target = new Form1_Accessor(); // TODO: 適切な値に初期化してください
            target.InitializeForm();
            target.LeftText.Text = "10";
            target.RightText.Text = "10";

            target.OperatorComboBox.SelectedItem = Operators.Plus.ToSign();
            Assert.AreEqual(20, target.Calc());

            target.OperatorComboBox.SelectedItem = Operators.Minus.ToSign();
            Assert.AreEqual(0, target.Calc());

            target.OperatorComboBox.SelectedItem = Operators.Multiply.ToSign();
            Assert.AreEqual(100, target.Calc());

            target.OperatorComboBox.SelectedItem = Operators.Divide.ToSign();
            Assert.AreEqual(1, target.Calc());
        }
Exemplo n.º 22
0
 public void InitializeComponentTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     target.InitializeComponent();
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemplo n.º 23
0
 public void TestFunctionTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     int a = 0; // TODO: Initialize to an appropriate value
     int b = 0; // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.TestFunction(a, b);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 24
0
 public void InitializeFormTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: 適切な値に初期化してください
     target.InitializeForm();
     Assert.AreEqual(4, target.OperatorComboBox.Items.Count);
 }
Exemplo n.º 25
0
 public void RandomNumTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: 初始化为适当的值
     target.RandomNum();
     Assert.Inconclusive("无法验证不返回值的方法。");
 }
Exemplo n.º 26
0
 public void InitializeComponentTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: 初始化为适当的值
     target.InitializeComponent();
     Assert.Inconclusive("无法验证不返回值的方法。");
 }
Exemplo n.º 27
0
 public void rotateTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     float angle = 0F; // TODO: Initialize to an appropriate value
     target.rotate(angle);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemplo n.º 28
0
 public void button1_ClickTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     object sender = target.button1; // TODO: Initialize to an appropriate value
     EventArgs e = new EventArgs();  // TODO: Initialize to an appropriate value
     target.textBox1.Text = "20";
     target.textBox2.Text = "10";
     try
     {
         target.button1_Click(sender, e);
         Assert.IsTrue(true);
     }
     catch(Form1.NotIntegerException fr)
     {
         System.Windows.Forms.MessageBox.Show(fr.Message);
         Assert.IsTrue(false);
     }
 }
Exemplo n.º 29
0
 public void initGameTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     Assert.AreEqual(true, target.initGame());
     //Assert.Inconlusive("Verify the correctness of this test method.");
 }
Exemplo n.º 30
0
        public void OnButtonOKClickedTest()
        {
            Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
            object sender = null; // TODO: Initialize to an appropriate value
            EventArgs e = null; // TODO: Initialize to an appropriate value


            // empty the data.xml if it exists
            XmlDocument doc = new XmlDocument();
            try
            {
                doc.Load("data.xml");
            }
            catch (Exception)
            {
                doc.LoadXml("<item></item>");
            }
            XmlTextWriter writer = new XmlTextWriter("data.xml", null);
            writer.Formatting = Formatting.Indented;
            doc.WriteTo(writer);
            writer.Close();

            target.textBox_play.Text = "Control + P";
            target.textBox_stop.Text = "Control + S";
            target.textBox_full.Text = "Alt + Enter";
            target.textBox_mute.Text = "F7";
            target.textBox_fwd.Text = "Shift + Control + F";
            target.textBox_bwd.Text = "Shift + Control + B";
            target.textBox_vup.Text = "F9";
            target.textBox_vdown.Text = "F8";
            target.textBox_class_name.Text = "WMPlayerApp";


            target.OnButtonOKClicked(sender, e);

            //check the elements in the xml
            doc.Load("data.xml");
            //the test shows NULL, need to parse in next time
            XmlNode root = doc.FirstChild;

            if (root.HasChildNodes)
            {
                XmlNode child = root.FirstChild;
                if (child.HasChildNodes)
                {
                    for (int i = 0; i < child.ChildNodes.Count; i++)
                    {
                        if(i == 0)
                            Assert.AreEqual(child.ChildNodes[i].InnerText, "WMPlayerApp");
                        if (i == 1)
                            Assert.AreEqual(child.ChildNodes[i].InnerText, "Control + P");
                        if (i == 2)
                            Assert.AreEqual(child.ChildNodes[i].InnerText, "Control + S");
                        if (i == 3)
                            Assert.AreEqual(child.ChildNodes[i].InnerText, "Alt + Enter");
                        if (i == 4)
                            Assert.AreEqual(child.ChildNodes[i].InnerText, "Shift + Control + F");
                        if (i == 5)
                            Assert.AreEqual(child.ChildNodes[i].InnerText, "Shift + Control + B");
                        if (i == 6)
                            Assert.AreEqual(child.ChildNodes[i].InnerText, "F7");
                        if (i == 7)
                            Assert.AreEqual(child.ChildNodes[i].InnerText, "F9");
                        if (i == 8)
                            Assert.AreEqual(child.ChildNodes[i].InnerText, "F8");
                    }
                }
            }
        }
Exemplo n.º 31
0
 public void DisposeTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: 初始化为适当的值
     bool disposing = false; // TODO: 初始化为适当的值
     target.Dispose(disposing);
     Assert.Inconclusive("无法验证不返回值的方法。");
 }
Exemplo n.º 32
0
 public void _openGLControl_PaintTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     object sender = null; // TODO: Initialize to an appropriate value
     PaintEventArgs e = null; // TODO: Initialize to an appropriate value
     target._openGLControl_Paint(sender, e);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemplo n.º 33
0
 public void GameLoopTest()
 {
     Form1_Accessor target = new Form1_Accessor(); // TODO: Initialize to an appropriate value
     double elapsedTime = 0F; // TODO: Initialize to an appropriate value
     target.GameLoop(elapsedTime);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }