Ignore:
Timestamp:
2017-02-25T14:29:42+01:00 (8 years ago)
Author:
Don-vip
Message:

see #14374 - sonar - pmd-unit-tests:UseAssertSameInsteadOfAssertTrue - Use assertSame instead of assertTrue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtilTest.java

    r11606 r11614  
    55import static org.junit.Assert.assertFalse;
    66import static org.junit.Assert.assertNull;
     7import static org.junit.Assert.assertSame;
    78import static org.junit.Assert.assertTrue;
    89
     
    8182        tc.add(otherSource); // other source should prevent resolution
    8283        TagConflictResolutionUtil.applyAutomaticTagConflictResolution(tc);
    83         assertTrue(tc.getValues("source").size() == 18);
     84        assertSame(18, tc.getValues("source").size());
    8485        tc.remove(otherSource);
    8586        TagConflictResolutionUtil.applyAutomaticTagConflictResolution(tc);
     
    372373        public void testGroupChoices() {
    373374            Collection<AutomaticChoiceGroup> groups = AutomaticChoiceGroup.groupChoices(Arrays.asList(choiceKey1Group1, choiceKey1Group2));
    374             assertTrue(groups.size() == 2);
     375            assertSame(2, groups.size());
    375376
    376377            groups = AutomaticChoiceGroup.groupChoices(Arrays.asList(
    377378                choiceKey1Group1, choiceKey1Group2, choiceKey2Group1, choiceKey2Group2, choiceEmpty));
    378             assertTrue(groups.size() == 5);
     379            assertSame(5, groups.size());
    379380
    380381            groups = AutomaticChoiceGroup.groupChoices(Arrays.asList(choiceKey1Group1, choiceKey1Group1bis));
    381             assertTrue(groups.size() == 1);
     382            assertSame(1, groups.size());
    382383            AutomaticChoiceGroup group1 = groups.iterator().next();
    383384            assertEquals(group1.key, choiceKey1Group1.key);
     
    388389                choiceKey1Group1, choiceKey1Group1bis, choiceKey1Group2, choiceKey1Group2bis,
    389390                choiceKey2Group1, choiceKey2Group1bis, choiceKey2Group2, choiceKey2Group2bis));
    390             assertTrue(groups.size() == 4);
     391            assertSame(4, groups.size());
    391392            for (AutomaticChoiceGroup group: groups) {
    392393                for (AutomaticChoice choice: group.choices) {
Note: See TracChangeset for help on using the changeset viewer.