Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void testconstructeurSousMarin1Ex() throws BadCoordException {
- Assertions.assertThrows(BadCoordException.class,
- () -> { s = new Submarine("SousMarin","A11");}
- );
- }
- @Test
- public void testconstructeurSousMarin2Ex() throws BadCoordException {
- Assertions.assertThrows(BadCoordException.class,
- () -> { s = new Submarine("SousMarin","J0");}
- );
- }
- @Test
- void testconstructeurSousMarin1() throws CoordsBadShipException {
- try {
- s = new Submarine("SousMarin","J10");
- } catch (BadCoordException e) {
- e.printStackTrace();
- }
- }
- @Test
- void testconstructeurSousMarin2() throws CoordsBadShipException {
- try {
- s = new Submarine("SousMarin","a1");
- } catch (BadCoordException e) {
- e.printStackTrace();
- }
- }
- @Test
- public void testconstructeurDestroyer1ExC() throws CoordsBadShipException {
- Assertions.assertThrows(CoordsBadShipException.class,
- () -> { s = new Destroyer("Destroyer","A1","A4");}
- );
- }
- @Test
- public void testconstructeurDestroyer2ExC() throws CoordsBadShipException {
- Assertions.assertThrows(CoordsBadShipException.class,
- () -> { s = new Destroyer("Destroyer","A1","D1");}
- );
- }
- @Test
- public void testconstructeurDestroyer3ExC() throws CoordsBadShipException {
- Assertions.assertThrows(CoordsBadShipException.class,
- () -> { s = new Destroyer("Destroyer","A1","D5");}
- );
- }
- @Test
- public void testconstructeurDestroyer4ExC() throws CoordsBadShipException {
- Assertions.assertThrows(CoordsBadShipException.class,
- () -> { s = new Destroyer("Destroyer","A1","B1");}
- );
- }
- @Test
- public void testconstructeurDestroyer5ExC() throws CoordsBadShipException {
- Assertions.assertThrows(CoordsBadShipException.class,
- () -> { s = new Destroyer("Destroyer","A1","A1");}
- );
- }
- @Test
- void testconstructeurDestroyer1() throws CoordsBadShipException {
- try {
- s = new Destroyer("Destroyer","A1","A2");
- } catch (BadCoordException e) {
- e.printStackTrace();
- }
- }
- @Test
- void testconstructeurDestroyer2() throws CoordsBadShipException {
- try {
- s = new Destroyer("Destroyer","A1","B1");
- } catch (BadCoordException e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement