org.hackystat.dailyprojectdata.resource.snapshot
Class TestSensorDataSnapshot

java.lang.Object
  extended by org.hackystat.dailyprojectdata.resource.snapshot.TestSensorDataSnapshot

public class TestSensorDataSnapshot
extends java.lang.Object

Tests the functionality of the SensorDataSnapshot.

Author:
jsakuda

Constructor Summary
TestSensorDataSnapshot()
           
 
Method Summary
static void setupServer()
          Starts the server, creates the user, and sends the data.
static void teardownServer()
          Deletes the sensordata and the user.
 void testSnapshot()
          Tests the getting of the last snapshot of the day.
 void testSnapshotBucketSize()
          Tests that the number of buckets retrieved during snapshot creation is correct.
 void testSnapshotWithTool()
          Test the getting of the last snapshot of the day for a particular tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSensorDataSnapshot

public TestSensorDataSnapshot()
Method Detail

setupServer

public static void setupServer()
                        throws java.lang.Exception
Starts the server, creates the user, and sends the data.

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

teardownServer

public static void teardownServer()
                           throws java.lang.Exception
Deletes the sensordata and the user.

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

testSnapshot

public void testSnapshot()
                  throws java.lang.Exception
Tests the getting of the last snapshot of the day.

Throws:
java.lang.Exception - Thrown if there is a failure to communicate with the sensorbase.

testSnapshotWithTool

public void testSnapshotWithTool()
                          throws java.lang.Exception
Test the getting of the last snapshot of the day for a particular tool.

Throws:
java.lang.Exception - Thrown if there is a failure communicating with the sensorbase.

testSnapshotBucketSize

public void testSnapshotBucketSize()
                            throws java.lang.Exception
Tests that the number of buckets retrieved during snapshot creation is correct.

Throws:
java.lang.Exception - Thrown if there is an error creating a snapshot.