com.googlecode.kevinarpe.papaya.testing
Class TestClassFinderUtils

java.lang.Object
  extended by com.googlecode.kevinarpe.papaya.object.StatelessObject
      extended by com.googlecode.kevinarpe.papaya.testing.TestClassFinderUtils
All Implemented Interfaces:
ITestClassFinderUtils

@FullyTested
public final class TestClassFinderUtils
extends StatelessObject
implements ITestClassFinderUtils

Constants and static utilities for TestClassFinder.

Author:
Kevin Connor ARPE (kevinarpe@gmail.com)
See Also:
newInstance(), newFactory(), TestClassFinder, StatelessObject, ITestClassFinderUtils

Field Summary
static List<Pattern> DEFAULT_EXCLUDE_PATTERN_LIST
          Default value for TestClassFinder.withExcludePatterns(): An empty list (no patterns).
static List<Pattern> DEFAULT_INCLUDE_PATTERN_LIST
          Default value for TestClassFinder.withIncludePatterns(): A single pattern to match all Java source files.
static File DEFAULT_ROOT_DIR_PATH
          Default value for TestClassFinder.withRootDirPath(): System property "user.dir".
static TestClassFinderUtils INSTANCE
          Single instance of this class provided for convenience.
 
Constructor Summary
TestClassFinderUtils()
          For projects that require total, static-free mocking capabilities, use this constructor.
 
Method Summary
 TestClassFinderFactory newFactory()
          Retrieves a TestClassFinderFactory.
 TestClassFinder newInstance()
          Constructs a new instance of TestClassFinder.
 
Methods inherited from class com.googlecode.kevinarpe.papaya.object.StatelessObject
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final TestClassFinderUtils INSTANCE
Single instance of this class provided for convenience. Since this class is stateless, its behaviour is identical between this instance and others.


DEFAULT_ROOT_DIR_PATH

public static final File DEFAULT_ROOT_DIR_PATH
Default value for TestClassFinder.withRootDirPath(): System property "user.dir". This is the equivalent of: new File(".").getAbsoluteFile()


DEFAULT_INCLUDE_PATTERN_LIST

public static final List<Pattern> DEFAULT_INCLUDE_PATTERN_LIST
Default value for TestClassFinder.withIncludePatterns(): A single pattern to match all Java source files.


DEFAULT_EXCLUDE_PATTERN_LIST

public static final List<Pattern> DEFAULT_EXCLUDE_PATTERN_LIST
Default value for TestClassFinder.withExcludePatterns(): An empty list (no patterns).

Constructor Detail

TestClassFinderUtils

public TestClassFinderUtils()
For projects that require total, static-free mocking capabilities, use this constructor. Else, the static constant INSTANCE will suffice.

Method Detail

newInstance

public TestClassFinder newInstance()
Constructs a new instance of TestClassFinder.

Specified by:
newInstance in interface ITestClassFinderUtils
Returns:
new instance
See Also:
ITestClassFinderUtils.newFactory()

newFactory

public TestClassFinderFactory newFactory()
Retrieves a TestClassFinderFactory. As the default factory implementation is stateless, a global instance is always returned by this helper. Unless an additional layer of indirection is required for mocking or testing, it is usually sufficient to call ITestClassFinderUtils.newInstance().

Specified by:
newFactory in interface ITestClassFinderUtils
Returns:
factory instance
See Also:
ITestClassFinderUtils.newInstance()


Copyright © 2013-2014. All Rights Reserved.