Class UnitTestMethodSorter
- java.lang.Object
-
- de.hsh.graja.regression.noisereduction.UnitTestMethodSorter
-
public class UnitTestMethodSorter extends Object
Unit test methods are stored by JUnit in a hash set, so the order of test method execution might vary between regression runs. This class provides an alphabetical sorter of test methods when in regression test mode (mock mode) and when there is no sorter specified in the test class.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
disableDefaultSortOrder()
Disables mock mode globallystatic void
enableDefaultSortOrder()
Enables mock mode globallystatic Comparator<String>
regressionTestableMethodSorter(Comparator<String> definedByTestClass)
If in mock mode this will return an alphabetical order of test methods, if the test class does not specify a specific sort order of test methods.
-
-
-
Method Detail
-
enableDefaultSortOrder
public static void enableDefaultSortOrder()
Enables mock mode globally
-
disableDefaultSortOrder
public static void disableDefaultSortOrder()
Disables mock mode globally
-
regressionTestableMethodSorter
public static Comparator<String> regressionTestableMethodSorter(Comparator<String> definedByTestClass)
If in mock mode this will return an alphabetical order of test methods, if the test class does not specify a specific sort order of test methods.
-
-