예제 #1
0
        public void FindBombs_WhenTwoArround_ReturnTwo()
        {
            BombsAnalyser analyser = new BombsAnalyser(_bombsMatrix);

            int nbrBomb = analyser.FindBombs(2, 1);

            Assert.AreEqual(2, nbrBomb);
        }
예제 #2
0
        public void FindBombs_WhenOneArround_ReturnOne()
        {
            BombsAnalyser analyser = new BombsAnalyser(_bombsMatrix);

            int nbrBomb = analyser.FindBombs(0, 0);

            Assert.AreEqual(1, nbrBomb);
        }
예제 #3
0
        public void FindBombs_WhenOnABomb_ReturnMinusOne()
        {
            BombsAnalyser analyser = new BombsAnalyser(_bombsMatrix);

            int nbrBomb = analyser.FindBombs(1, 1);

            Assert.AreEqual(-1, nbrBomb);
        }
예제 #4
0
        public void FindBombs_WhenOutsideOfMatrix_CoordinateY_ThrowException()
        {
            BombsAnalyser analyser = new BombsAnalyser(_bombsMatrix);

            int nbrBomb = analyser.FindBombs(0, 5);
        }