Ignore:
Timestamp:
2017-04-15T20:20:00+02:00 (7 years ago)
Author:
Don-vip
Message:

improve unit test coverage of utilities classes thanks to https://trajano.github.io/commons-testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java

    r11486 r11921  
    1616
    1717import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     18import net.trajano.commons.testing.UtilityClassTestUtil;
    1819
    1920/**
     
    3031    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    3132    public JOSMTestRules test = new JOSMTestRules().i18n().preferences();
     33
     34    /**
     35     * Tests that {@code DateUtils} satisfies utility class criterias.
     36     * @throws ReflectiveOperationException if an error occurs
     37     */
     38    @Test
     39    public void testUtilityClass() throws ReflectiveOperationException {
     40        UtilityClassTestUtil.assertUtilityClassWellDefined(DateUtils.class);
     41    }
    3242
    3343    /**
     
    209219        }
    210220    }
    211 
    212     /**
    213      * Unit test to reach 100% code coverage.
    214      */
    215     @Test
    216     @SuppressFBWarnings(value = "ISC_INSTANTIATE_STATIC_CLASS")
    217     public void testCoverage() {
    218         assertNotNull(new DateUtils());
    219     }
    220221}
Note: See TracChangeset for help on using the changeset viewer.