Exemplo n.º 1
0
 public void TestLuckyMusicPlaying()
 {
     GameForm form = new GameForm(true, false, 2);
     form.Show();
     form.StartGame(true, false, 2);
     Assert.IsTrue(form.Music.SoundLocation == @"../../Resources/GetLucky2.wav");
 }
Exemplo n.º 2
0
 public void TestCenaMusicPlaying()
 {
     GameForm form = new GameForm(false, true, 2);
     form.Show();
     form.StartGame(false, true, 2);
     Assert.IsTrue(form.Music.SoundLocation == @"../../Resources/JohnCena.wav");
 }
Exemplo n.º 3
0
 public void TestReadHighScores()
 {
     GameForm form = new GameForm (false, true, 2);
     form.Show ();
     form.StartGame(true, false, 2);
     form.Die ();
     StringAssert.Contains (Settings.Score.ToString(), form.gameOver);
 }
Exemplo n.º 4
0
 public void TestGameMessages()
 {
     GameForm form = new GameForm(false,false,2);
     form.Show();
     Assert.IsTrue(form.lblScore.Visible, "Checks if lblScore is visible");
 }
Exemplo n.º 5
0
 public void TestWriteHighScores()
 {
     GameForm form = new GameForm (false, true, 2);
     form.Show ();
     form.StartGame(true, false, 2);
     form.Die ();
     Assert.AreEqual(Settings.Score, form.iHighScores[form.iHighScores.LastIndexOf(Settings.Score)]);
 }
Exemplo n.º 6
0
        //Tests methods
        public void StartGame()
        {
            MenuMusic.Stop();

            GameForm game;
            if (a == true || changed == true)
            {
                game = new GameForm(a, c, d);
                this.Hide();
                game.Show();
            }
            else
            {
                game = new GameForm(false, false, 1);
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// Starts Game
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void StartGame(object sender, EventArgs e)
 {
     GameForm game;
     if (a == true || changed == true)
     {
         game = new GameForm(a, c, d);
         this.Hide();
         game.Show();
     }
     else
     {
         game = new GameForm(false,false,1);
     }
 }