public void TestCreateNew()
 {
     PlayerBO player = new PlayerBO();
     //adding comments to my unit tests
     //more comments
     player.AddPlayer("Kei Nishikori", "Japan", "", "");
     Assert.IsTrue(player.GetPlayerByName("Kei Nishikori").IsActive);
 }
Пример #2
0
        public void AddMatch(string player1Name, string player2Name, string score)
        {
            PlayerBO playerbo = new PlayerBO();
            Player player1 = playerbo.GetPlayerByName(player1Name);
            Player player2 = playerbo.GetPlayerByName(player2Name);

            Match match = new Match();
            match.Player1 = player1;
            match.Player2 = player2;
            match.Score = score;

            match.Winner = FindWinner(score, player1, player2);

            MatchDAL.GetInstance().Add(match);
        }
Пример #3
0
        public void AddMatch(string player1Name, string player2Name, string score)
        {
            PlayerBO playerbo = new PlayerBO();
            Player   player1  = playerbo.GetPlayerByName(player1Name);
            Player   player2  = playerbo.GetPlayerByName(player2Name);

            Match match = new Match();

            match.Player1 = player1;
            match.Player2 = player2;
            match.Score   = score;

            match.Winner = FindWinner(score, player1, player2);

            MatchDAL.GetInstance().Add(match);
        }
Пример #4
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     PlayerBO player = new PlayerBO();
     player.AddPlayer(txtName.Text, txtAddress.Text, txtPhone.Text, txtEmail.Text);
     Server.Transfer("~/Player.aspx");
 }