Exemplo n.º 1
0
        public void Create_Plateau_Test_Exception_Empty()
        {
            string          coordinates    = "5";
            IPlateauService plateauService = new PlateauService();

            plateauService.CreatePlateau(coordinates);
        }
Exemplo n.º 2
0
        public void Create_Plateau_Test_Exception_With_Two_Character()
        {
            string          coordinates    = "e e";
            IPlateauService plateauService = new PlateauService();

            plateauService.CreatePlateau(coordinates);
        }
Exemplo n.º 3
0
        public void Create_Plateau_Test()
        {
            string          coordinates    = "5 5";
            IPlateauService plateauService = new PlateauService();

            plateauService.CreatePlateau(coordinates);

            Assert.AreEqual(plateauService.Plateau.UpperX, 5);
            Assert.AreEqual(plateauService.Plateau.UpperY, 5);
        }
Exemplo n.º 4
0
        public void Is_Valid_Coordinate_X_False_Test()
        {
            string          coordinates    = "5 5";
            IPlateauService plateauService = new PlateauService();

            plateauService.CreatePlateau(coordinates);

            var result = plateauService.IsValidPosition(new Models.Position {
                D = 'N', X = 6, Y = 2
            });

            Assert.AreEqual(false, result);
        }