Ejemplo n.º 1
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)]);
 }
Ejemplo n.º 2
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);
 }
Ejemplo n.º 3
0
        public void TestSnakeDies()
        {
            GameForm form = new GameForm(false,false,2);
            new Settings();

            form.StartGame(false, false, 2);
            Assert.AreEqual(Settings.GameOver, false);
            form.Die();
            Assert.AreEqual(Settings.GameOver, true);
        }