示例#1
0
        public void TestOpponent()
        {
            //name of opponents is retrived
            ChooseOpponentBLL bll = new ChooseOpponentBLL();
            bool      actualResult, expectedResult;
            DataTable dtCheck = bll.RetriveUsers();

            expectedResult = true;
            if (dtCheck.Rows.Count > 0)
            {
                actualResult = true;
            }
            else
            {
                actualResult = false;
            }

            Assert.AreEqual(actualResult, expectedResult);
        }
示例#2
0
        private void LoadForm()
        {
            int       x = 20, y = 30;
            DataTable dt = bll.RetriveUsers();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string newPlayer = dt.Rows[i][3].ToString();
                if (player1 != newPlayer)
                {
                    radio           = new RadioButton();
                    radio.Location  = new Point(x, y);
                    radio.Size      = new Size(200, 40);
                    radio.Text      = newPlayer;
                    radio.ForeColor = Color.White;
                    grpChoose.Controls.Add(radio);
                    y += 50;
                }
            }
        }