org.hackystat.dailyprojectdata.resource.coverage
Class TestCoverageData

java.lang.Object
  extended by org.hackystat.dailyprojectdata.resource.coverage.TestCoverageData

public class TestCoverageData
extends java.lang.Object

Tests if the CoverageData wraps a SensorData instance as intended.

Author:
aito

Constructor Summary
TestCoverageData()
           
 
Method Summary
static org.hackystat.sensorbase.resource.sensordata.jaxb.SensorData createData(java.lang.String timestamp, java.lang.String runtime, java.lang.String owner, java.lang.String resource)
          A helper method used to create the SensorData instances used to by this test class.
 void setUp()
          Setup this test class.
 void testEquals()
          Tests the overridden .equals method returns the correct values.
 void testGetCoverageProperty()
          Tests if the correct Property is returned or that null is returned if the property does not exist.
 void testGetCovered()
          Tests if the correct amount of uncovered coverage entities is returned.
 void testGetResource()
          Tests if the resource returned from the wrapper class is the same as the resource in the SensorData instance.
 void testGetRuntime()
          Tests if the correct runtime is returned.
 void testGetUncovered()
          Tests if the correct amount of uncovered coverage entities is returned.
 void testGranularityCaseInsensitivity()
          Tests if the correct coverage data is returned regardless of the granularity's case.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCoverageData

public TestCoverageData()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Setup this test class.

Throws:
java.lang.Exception - If problems occur.

testGetRuntime

public void testGetRuntime()
Tests if the correct runtime is returned.


testGetUncovered

public void testGetUncovered()
Tests if the correct amount of uncovered coverage entities is returned.


testGetCovered

public void testGetCovered()
Tests if the correct amount of uncovered coverage entities is returned.


testGetResource

public void testGetResource()
Tests if the resource returned from the wrapper class is the same as the resource in the SensorData instance.


testGetCoverageProperty

public void testGetCoverageProperty()
Tests if the correct Property is returned or that null is returned if the property does not exist.


testEquals

public void testEquals()
                throws java.lang.Exception
Tests the overridden .equals method returns the correct values.

Throws:
java.lang.Exception - if problems occur

testGranularityCaseInsensitivity

public void testGranularityCaseInsensitivity()
Tests if the correct coverage data is returned regardless of the granularity's case.


createData

public static org.hackystat.sensorbase.resource.sensordata.jaxb.SensorData createData(java.lang.String timestamp,
                                                                                      java.lang.String runtime,
                                                                                      java.lang.String owner,
                                                                                      java.lang.String resource)
                                                                               throws java.lang.Exception
A helper method used to create the SensorData instances used to by this test class.

Parameters:
timestamp - the timestamp of the created sensor data instance.
runtime - the runtime of the SensorData instance.
owner - the specified owner.
resource - the specified resource.
Returns:
the populated SensorData instance.
Throws:
java.lang.Exception - if problems occur.