Ejemplo n.º 1
0
        public void TestPacmanDidDiedFalseDidLoseLifeFalse()
        {
            Point expected = new Point(4, 4);

            this.pacmanModelMock.Object.Pacman      = new Point(4, 4);
            this.pacmanModelMock.Object.RedGhost    = new Point(5, 4);
            this.pacmanModelMock.Object.PacmanLifes = 2;
            PacmanLogic pacmanLogic = new PacmanLogic(this.pacmanModelMock.Object, this.lvl, false);

            bool died = pacmanLogic.PacmanDied();

            Assert.AreEqual(false, died);
            Assert.AreEqual(expected, this.pacmanModelMock.Object.Pacman);
            Assert.AreEqual(2, this.pacmanModelMock.Object.PacmanLifes);
        }
Ejemplo n.º 2
0
        public void TestPacmanDidDiedTrue()
        {
            Point expected = new Point(1, 30);

            this.pacmanModelMock.Object.Pacman      = new Point(4, 4);
            this.pacmanModelMock.Object.RedGhost    = new Point(4, 4);
            this.pacmanModelMock.Object.PacmanLifes = 1;
            PacmanLogic pacmanLogic = new PacmanLogic(this.pacmanModelMock.Object, this.lvl, false);

            bool died = pacmanLogic.PacmanDied();

            Assert.AreEqual(true, died);
            Assert.AreEqual(expected, this.pacmanModelMock.Object.Pacman);
            Assert.AreEqual(0, this.pacmanModelMock.Object.PacmanLifes);
        }