org.hackystat.sensor.ant.test
Class AntSensorTestHelper

java.lang.Object
  extended by org.hackystat.sensor.ant.test.AntSensorTestHelper
Direct Known Subclasses:
TestCheckstyleSensor, TestCloverSensor, TestDependencyFinderSensor, TestEmmaSensor, TestFindBugsSensor, TestIssueSensor, TestJavaNcssSensor, TestJDependSensor, TestJUnitSensor, TestPmdSensor

public class AntSensorTestHelper
extends java.lang.Object

Provides a helper method for Ant sensor test case development.

Author:
Philip Johnson

Field Summary
protected static java.lang.String host
          The test host.
protected static org.hackystat.sensorbase.server.Server server
          The test sensorbase server.
protected static java.lang.String user
          The test user.
 
Constructor Summary
AntSensorTestHelper()
           
 
Method Summary
 java.util.List<java.io.File> getXmlFiles(java.lang.String testFileDir)
          Returns a list of XML files in the passed testFileDir directory.
static void setupServer()
          Starts the server going for these tests, and makes sure our test user is registered.
static void teardownServer()
          Gets rid of the sent sensor data and the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

user

protected static final java.lang.String user
The test user.

See Also:
Constant Field Values

host

protected static java.lang.String host
The test host.


server

protected static org.hackystat.sensorbase.server.Server server
The test sensorbase server.

Constructor Detail

AntSensorTestHelper

public AntSensorTestHelper()
Method Detail

setupServer

public static void setupServer()
                        throws java.lang.Exception
Starts the server going for these tests, and makes sure our test user is registered.

Throws:
java.lang.Exception - If problems occur setting up the server.

teardownServer

public static void teardownServer()
                           throws java.lang.Exception
Gets rid of the sent sensor data and the user.

Throws:
java.lang.Exception - If problems occur setting up the server.

getXmlFiles

public java.util.List<java.io.File> getXmlFiles(java.lang.String testFileDir)
                                         throws java.lang.Exception
Returns a list of XML files in the passed testFileDir directory.

Parameters:
testFileDir - The directory in which the test files are found.
Returns:
The list of XML files.
Throws:
java.lang.Exception - If the test directory cannot be found.