package org.amc.game.chess;

import static org.junit.Assert.*;
import org.amc.game.chess.ChessBoard.Coordinate;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import jdk.nashorn.internal.AssertsEnabled;

public class LocationTest {

    @Before
    public void setUp() throws Exception {
    }

    @After
    public void tearDown() throws Exception {
    }

    @Test(expected = java.lang.IllegalArgumentException.class)
    public void test() {
        new Location(Coordinate.D, 9);
    }
    
    @Test
    public void testString() {
        Location location = new Location("A1");
        assertTrue(location.getLetter().equals(Coordinate.A));
        assertEquals(location.getNumber(), 1);
    }
    
    @Test
    public void testLowerCaseString() {
        Location location = new Location("a1");
        assertTrue(location.getLetter().equals(Coordinate.A));
        assertEquals(location.getNumber(), 1);
    }
    
    @Test(expected = java.lang.IllegalArgumentException.class)
    public void testStringTooLong() {
        Location location = new Location("A1B1");
    }
    
    @Test(expected = java.lang.IllegalArgumentException.class)
    public void testStringWrongLetterCoordinate() {
        Location location = new Location("K1");
    }
    
    @Test(expected = java.lang.IllegalArgumentException.class)
    public void testStringWrongNumberCoordinate() {
        Location location = new Location("A9");
    }

    
    public void testAsString() {
        Location location = new Location(Coordinate.G, 4);
        assertEquals(location.asString(), "G4");
    }
}

@@ -182,53 +182,8 @@
 t;%0A%0A
-import jdk.nashorn.internal.AssertsEnabled;%0A%0A
 publ
@@ -1008,36 +1008,16 @@
 %0A       
- Location location =
  new Loc
@@ -1027,24 +1027,24 @@
 on(%22A1B1%22);%0A
+
     %7D%0A    %0A 
@@ -1164,36 +1164,16 @@
 %0A       
- Location location =
  new Loc
@@ -1315,35 +1315,15 @@
 ) %7B%0A
+
        
- Location location =
  new

remove unused local variables