#291 A few patches to fix coverage testing warnings

Needs_Review
closed
nobody
cdk-1.4.x (181)
5
2012-10-28
2010-10-22
No

Note that the warnings are new, as we only recently started testing the coverage of constructors. Therefore, all fixes have to do with testing of constructors.

0001-Added-missing-TestMethod-annotation.patch

Simple.

0002-Fixed-unit-test-test-the-correct-class.patch

Here the constructors were not tested, and not present in the source code either. Hence, there is the default public constructor. However, since these classes are not supposed to be instantiated, I added private constructors making exactly that impossible. Private constructors do not have to be tested, and hence fix these warnings.

0003-Removed-an-obsolete-test.patch

The next unit test tests the exact same. This remove unit test is a left over from a past version where a constructor existed that took an Object as parameter.

Discussion

  • Rajarshi Guha

    Rajarshi Guha - 2010-10-23

    Applied and pushed (though I have to question the utility of test methods for empty public constructores)

     
  • Egon Willighagen

    Classloading... we're not just that far that we can run the test classes anywhere, but with the dynamic classloading systems around, some parent class may not be present (which I do have, e.g. for Oscar in Taverna ;)... I do not think this is very common for the CDK, but just expecting a test is not too bad, and the test can be really simple:

    Assert.assertNotNull(new Foo());

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks