OpenNMS/opennms — pull request #22 by fooker (2013-07-16 08:01:50+00:00)
Title: Changed unmarshalling integration test to use parametrized unit tests and a separate coverage test

The famous WillItUnmarshall unit test now uses some parametrized test magic to make the integration tests for the configuration files more easy and avoids adding multiple lines of code for each new configuration file.

Using this method, a new configuration file can be added by adding one single line of code and a new test instance for this file is created automagically.

This also moves the test coverage mechanism for the old version to a separate class, testing the coverage of the WillItUnmarshall test without making assumptions on the test execution order as the current version does. This meta test also uses the parametrized test feature to provide a test instance for each file in the /etc directories checking the coverage for this file and providing a clean test failure if the file is not covered and allowing easy debugging of test failures.