org.hackystat.sensorbase.resource.users
Class TestUsersRestApi

java.lang.Object
  extended by org.hackystat.sensorbase.test.SensorBaseRestApiHelper
      extended by org.hackystat.sensorbase.resource.users.TestUsersRestApi

public class TestUsersRestApi
extends SensorBaseRestApiHelper

Tests the SensorBase REST API for Users and User resources.

Author:
Philip M. Johnson

Field Summary
 
Fields inherited from class org.hackystat.sensorbase.test.SensorBaseRestApiHelper
adminEmail, adminPassword, projectManager, sdtManager, sensorDataManager, server, userManager
 
Constructor Summary
TestUsersRestApi()
           
 
Method Summary
 void deleteUser()
          Tests that a user can be deleted after creation.
 void getUser()
          Test that GET host/sensorbase/users/TestUser@hackystat.org returns the TestUser test user.
 void getUsersIndex()
          Test that GET host/sensorbase/users returns an index containing TestUser and that the HREFs are OK.
 void isHost()
          Test that the SensorBaseClient.isHost() method operates correctly.
 void isRegistered()
          Test that the SensorBaseClient.isRegistered() method operates correctly.
 void postUserProperties()
          Tests that a user can have their properties updated.
 void registerUser()
          Tests the POST method that registers a new user.
 void registerUsers()
          Tests multiple register users.
 
Methods inherited from class org.hackystat.sensorbase.test.SensorBaseRestApiHelper
getHostName, setupServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestUsersRestApi

public TestUsersRestApi()
Method Detail

getUsersIndex

public void getUsersIndex()
                   throws java.lang.Exception
Test that GET host/sensorbase/users returns an index containing TestUser and that the HREFs are OK.

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

isHost

public void isHost()
            throws java.lang.Exception
Test that the SensorBaseClient.isHost() method operates correctly.

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

isRegistered

public void isRegistered()
                  throws java.lang.Exception
Test that the SensorBaseClient.isRegistered() method operates correctly.

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

getUser

public void getUser()
             throws java.lang.Exception
Test that GET host/sensorbase/users/TestUser@hackystat.org returns the TestUser test user.

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

registerUser

public void registerUser()
                  throws java.lang.Exception
Tests the POST method that registers a new user.

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

registerUsers

public void registerUsers()
                   throws java.lang.Exception
Tests multiple register users.

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

deleteUser

public void deleteUser()
                throws java.lang.Exception
Tests that a user can be deleted after creation.

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

postUserProperties

public void postUserProperties()
                        throws java.lang.Exception
Tests that a user can have their properties updated.

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