Changeset 10743 in josm for trunk/test


Ignore:
Timestamp:
2016-08-06T01:12:07+02:00 (3 years ago)
Author:
Don-vip
Message:

sonar - pmd-unit-tests:UseAssertTrueInsteadOfAssertEquals

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java

    r9382 r10743  
    33
    44import static org.junit.Assert.assertEquals;
     5import static org.junit.Assert.assertFalse;
    56import static org.junit.Assert.assertTrue;
    67
     
    5051        assertEquals("Misspelled property key", errors.get(0).getMessage());
    5152        assertEquals("Key 'Name' looks like 'name'.", errors.get(0).getDescription());
    52         assertEquals(true, errors.get(0).isFixable());
     53        assertTrue(errors.get(0).isFixable());
    5354    }
    5455
     
    6364        assertEquals("Misspelled property key", errors.get(0).getMessage());
    6465        assertEquals("Key 'landuse;' looks like 'landuse'.", errors.get(0).getDescription());
    65         assertEquals(true, errors.get(0).isFixable());
     66        assertTrue(errors.get(0).isFixable());
    6667    }
    6768
     
    7778        assertEquals("Misspelled property key", errors.get(0).getMessage());
    7879        assertEquals("Key 'Brand' looks like 'brand'.", errors.get(0).getDescription());
    79         assertEquals(false, errors.get(0).isFixable());
     80        assertFalse(errors.get(0).isFixable());
    8081    }
    8182
  • trunk/test/unit/org/openstreetmap/josm/gui/correction/RoleCorrectionTableTest.java

    r10133 r10743  
    6262        assertEquals("foo", model.getValueAt(0, 1));
    6363        assertEquals("bar", model.getValueAt(0, 2));
    64         assertEquals(Boolean.TRUE, model.getValueAt(0, 3));
     64        assertTrue((Boolean) model.getValueAt(0, 3));
    6565        assertNull(model.getValueAt(0, 4));
    6666        model.setValueAt("", 0, 0);
    6767        assertEquals("relation (0, 1 member)", model.getValueAt(0, 0));
    6868        model.setValueAt("", 0, 3);
    69         assertEquals(Boolean.TRUE, model.getValueAt(0, 3));
     69        assertTrue((Boolean) model.getValueAt(0, 3));
    7070        model.setValueAt(Boolean.FALSE, 0, 3);
    71         assertEquals(Boolean.FALSE, model.getValueAt(0, 3));
     71        assertFalse((Boolean) model.getValueAt(0, 3));
    7272        RoleCorrection[] array = new RoleCorrection[15];
    7373        Arrays.fill(array, rc);
  • trunk/test/unit/org/openstreetmap/josm/gui/correction/TagCorrectionTableTest.java

    r10133 r10743  
    6767        assertEquals("foo", model.getValueAt(0, 2));
    6868        assertEquals("baz", model.getValueAt(0, 3));
    69         assertEquals(Boolean.TRUE, model.getValueAt(0, 4));
     69        assertTrue((Boolean) model.getValueAt(0, 4));
    7070        assertNull(model.getValueAt(0, 5));
    7171        assertEquals("bar", model.getValueAt(1, 0));
     
    7373        assertEquals("baz", model.getValueAt(1, 2));
    7474        assertEquals("foo", model.getValueAt(1, 3));
    75         assertEquals(Boolean.TRUE, model.getValueAt(1, 4));
     75        assertTrue((Boolean) model.getValueAt(1, 4));
    7676        assertNull(model.getValueAt(1, 5));
    7777        model.setValueAt("", 0, 0);
    7878        assertEquals("foo", model.getValueAt(0, 0));
    7979        model.setValueAt("", 0, 4);
    80         assertEquals(Boolean.TRUE, model.getValueAt(0, 4));
     80        assertTrue((Boolean) model.getValueAt(0, 4));
    8181        model.setValueAt(Boolean.FALSE, 0, 4);
    82         assertEquals(Boolean.FALSE, model.getValueAt(0, 4));
     82        assertFalse((Boolean) model.getValueAt(0, 4));
    8383        TagCorrection[] array = new TagCorrection[15];
    8484        Arrays.fill(array, tc1);
Note: See TracChangeset for help on using the changeset viewer.