public void DeberiaArrojarExcepcionSiLaNaveYaExisteEnElTablero() { var tablero = new Tablero(); var lancha = new Lancha(new Posicion('d', 5), Direccion.Este, tablero.GetAreaDePosicionesValidas()); tablero.ColocarNave(lancha); tablero.ColocarNave(lancha); }
public void DeberiaColocarNave() { var tablero = new Tablero(); var lancha = new Lancha(new Posicion('d', 5), Direccion.Este, tablero.GetAreaDePosicionesValidas()); tablero.ColocarNave(lancha); Assert.AreSame(lancha, tablero.GetNaveEn(new Posicion('d', 5))); Assert.AreSame(lancha, tablero.GetNaveEn(new Posicion('e', 5))); }
public void DeberiaArrojarExcepcionSiNaveAColocarEsNull() { var tablero = new Tablero(); tablero.ColocarNave(null); }