Changeset 7851 in josm for trunk/test


Ignore:
Timestamp:
2014-12-20T03:43:21+01:00 (5 years ago)
Author:
Don-vip
Message:

code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/AlignInLineActionTest.java

    r7850 r7851  
    4646    @Test
    4747    public void nodesOpenWay() {
    48         DataSet dataSet;
    49         OsmDataLayer layer;
    50         Node point1, point2, point3;
    51 
    52         dataSet = new DataSet();
    53         layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null);
     48        DataSet dataSet = new DataSet();
     49        OsmDataLayer layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null);
    5450
    5551        // Create test points, lower left is (0,0).
     
    5854        // - 3 - 2
    5955        // - - - -
    60         point1 = new Node(new EastNorth(0, 2));
    61         point2 = new Node(new EastNorth(3, 1));
    62         point3 = new Node(new EastNorth(1, 1));
     56        Node point1 = new Node(new EastNorth(0, 2));
     57        Node point2 = new Node(new EastNorth(3, 1));
     58        Node point3 = new Node(new EastNorth(1, 1));
    6359
    6460        try {
     
    8985    @Test
    9086    public void nodesClosedWay() {
    91         DataSet dataSet;
    92         OsmDataLayer layer;
    93         Node point1, point2, point3, point4;
    94 
    95         dataSet = new DataSet();
    96         layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null);
     87        DataSet dataSet = new DataSet();
     88        OsmDataLayer layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null);
    9789
    9890        // Create test points, lower left is (0,0).
     
    10193        // - - -
    10294        // 1 - 2
    103         point1 = new Node(new EastNorth(0, 0));
    104         point2 = new Node(new EastNorth(2, 0));
    105         point3 = new Node(new EastNorth(2, 2));
    106         point4 = new Node(new EastNorth(0, 2));
     95        Node point1 = new Node(new EastNorth(0, 0));
     96        Node point2 = new Node(new EastNorth(2, 0));
     97        Node point3 = new Node(new EastNorth(2, 2));
     98        Node point4 = new Node(new EastNorth(0, 2));
    10799
    108100        try {
     
    133125    @Test
    134126    public void nodesOpenWays() {
    135         DataSet dataSet;
    136         OsmDataLayer layer;
    137         Node point1, point2, point3, point4;
    138 
    139         dataSet = new DataSet();
    140         layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null);
     127        DataSet dataSet = new DataSet();
     128        OsmDataLayer layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null);
    141129
    142130        // Create test points, lower left is (0,0).
     
    145133        // 3 - 2
    146134        // - - 4
    147         point1 = new Node(new EastNorth(0, 2));
    148         point2 = new Node(new EastNorth(2, 1));
    149         point3 = new Node(new EastNorth(0, 1));
    150         point4 = new Node(new EastNorth(2, 0));
     135        Node point1 = new Node(new EastNorth(0, 2));
     136        Node point2 = new Node(new EastNorth(2, 1));
     137        Node point3 = new Node(new EastNorth(0, 1));
     138        Node point4 = new Node(new EastNorth(2, 0));
    151139
    152140        try {
     
    180168     */
    181169    private void createWay(DataSet dataSet, Node... nodes) {
    182         Way way;
    183 
    184         way = new Way();
     170        Way way = new Way();
    185171        dataSet.addPrimitive(way);
    186172
     
    202188     */
    203189    private void assertCoordEq(Node node, double x, double y) {
    204         EastNorth coordinate;
    205 
    206         coordinate = node.getEastNorth();
     190        EastNorth coordinate = node.getEastNorth();
    207191        assertEquals("Wrong x coordinate.", x, coordinate.getX(), LatLon.MAX_SERVER_PRECISION);
    208192        assertEquals("Wrong y coordinate.", y, coordinate.getY(), LatLon.MAX_SERVER_PRECISION);
Note: See TracChangeset for help on using the changeset viewer.