org.hackystat.dailyprojectdata.resource.build
Class TestBuildRestApi
java.lang.Object
org.hackystat.dailyprojectdata.test.DailyProjectDataTestHelper
org.hackystat.dailyprojectdata.resource.build.TestBuildRestApi
public class TestBuildRestApi
- extends DailyProjectDataTestHelper
Tests the Build portion of the DailyProjectData REST API.
- Author:
- jsakuda
Method Summary |
static org.hackystat.sensorbase.resource.sensordata.jaxb.SensorData |
makeBuild(java.lang.String tstampString,
java.lang.String user,
java.lang.String runtimeString,
java.lang.String type,
java.lang.String result)
Creates a sample SensorData Build instance. |
void |
testGetBuilds()
Test that GET {host}/build/{user}/Default/{starttime} works properly. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestBuildRestApi
public TestBuildRestApi()
testGetBuilds
public void testGetBuilds()
throws java.lang.Exception
- Test that GET {host}/build/{user}/Default/{starttime} works properly. First, it creates a
test user and sends some sample Build data to the SensorBase. Then, it invokes the GET
request and checks to see that it obtains the right answer. Finally, it deletes the data
and the user.
- Throws:
java.lang.Exception
- If problems occur.
makeBuild
public static org.hackystat.sensorbase.resource.sensordata.jaxb.SensorData makeBuild(java.lang.String tstampString,
java.lang.String user,
java.lang.String runtimeString,
java.lang.String type,
java.lang.String result)
throws java.lang.Exception
- Creates a sample SensorData Build instance.
- Parameters:
tstampString
- The timestamp as a stringuser
- The user.runtimeString
- The runtime.type
- The optional type of the build.result
- "Success" or "Failure".
- Returns:
- The new SensorData Build instance.
- Throws:
java.lang.Exception
- If problems occur.