Ejemplo n.º 1
0
        public void Post_TwoBigMines_AllExplode()
        {
            // Arrange
            var unitUnderTest      = this.CreateMinesController();
            List <MineModel> mines = new List <MineModel> {
                new MineModel(1, 1, 1),
                new MineModel(2, 1, 0),
                new MineModel(28, 32, 105),
                new MineModel(28, 33, 105)
            };

            // Act
            var result = MinesController.Post(
                mines);

            // Assert
            Assert.True(result.Value.MinesExploded == 4);
        }
Ejemplo n.º 2
0
        public void Post_TwoBigMines_BothReturned()
        {
            // Arrange
            var unitUnderTest      = this.CreateMinesController();
            List <MineModel> mines = new List <MineModel> {
                new MineModel(1, 1, 1),
                new MineModel(2, 1, 0),
                new MineModel(28, 32, 105),
                new MineModel(28, 33, 105)
            };

            // Act
            var result = MinesController.Post(
                mines);

            // Assert
            Assert.True(result.Value.PossibleStartingMines.Count() == 2);
        }