org.fuin.units4j
Class AssertCoverage

java.lang.Object
  extended by org.fuin.units4j.AssertCoverage

public final class AssertCoverage
extends java.lang.Object

Assertion tool class for checking the test coverage.


Method Summary
static void assertEveryClassHasATest(java.io.File baseDir)
          Asserts that a every class in the directory (or it's sub directories) has at least one test class.
static void assertEveryClassHasATest(java.io.File baseDir, boolean recursive)
          Asserts that a every class in the directory (or it's sub directories) has at least one test class.
static void assertEveryClassHasATest(java.util.Set<java.lang.Class<?>> classes)
          Asserts that a every class has at least one test class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

assertEveryClassHasATest

public static final void assertEveryClassHasATest(java.util.Set<java.lang.Class<?>> classes)
Asserts that a every class has at least one test class. It's assumed that the name of the test class follows the pattern XxxxxTest, where Xxxxx is the name of the class that is tested. The class must contain at least one method annotated with Test.

Parameters:
classes - Set of classes - Cannot be null.

assertEveryClassHasATest

public static final void assertEveryClassHasATest(java.io.File baseDir)
Asserts that a every class in the directory (or it's sub directories) has at least one test class. It's assumed that the name of the test class follows the pattern XxxxxTest, where Xxxxx is the name of the class that is tested. The class must contain at least one method annotated with Test.

Parameters:
baseDir - Root directory like ("src/main/java").

assertEveryClassHasATest

public static final void assertEveryClassHasATest(java.io.File baseDir,
                                                  boolean recursive)
Asserts that a every class in the directory (or it's sub directories) has at least one test class. It's assumed that the name of the test class follows the pattern XxxxxTest, where Xxxxx is the name of the class that is tested. The class must contain at least one method annotated with Test.

Parameters:
baseDir - Root directory like ("src/main/java").
recursive - Should sub directories be included?


Copyright © 2010 Future Invent Informationsmanagement GmbH. All Rights Reserved.