org.hackystat.sensorbase.resource.projects
Class TestProjectMembershipRestApi

java.lang.Object
  extended by org.hackystat.sensorbase.test.SensorBaseRestApiHelper
      extended by org.hackystat.sensorbase.resource.projects.TestProjectMembershipRestApi

public class TestProjectMembershipRestApi
extends SensorBaseRestApiHelper

Tests the SensorBase REST API for Project membership processing.

Author:
Philip M. Johnson

Field Summary
 
Fields inherited from class org.hackystat.sensorbase.test.SensorBaseRestApiHelper
adminEmail, adminPassword, projectManager, sdtManager, sensorDataManager, server, userManager
 
Constructor Summary
TestProjectMembershipRestApi()
           
 
Method Summary
static void setupMembership()
          Starts the server going for these tests, and makes sure our test user is registered.
 void testInvitation1()
          Tests a "normal" invitation acceptance use case: testUser1 creates a new project called TestProject1, and puts testUser2 on the invitation list.
 void testInvitation2()
          Just like testNormalInvitation1, but we use the invite() method to invite testUser2 after the project has already been defined.
 void testInvitation3()
          We now test that if testUser2 declines the invitation, the project representation no longer contains testUser2.
 void testMultiProjectMemberDataAccess()
          Tests that we can send data from two different users and retrieve it as part of a joint project.
 
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

TestProjectMembershipRestApi

public TestProjectMembershipRestApi()
Method Detail

setupMembership

public static void setupMembership()
                            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.

testInvitation1

public void testInvitation1()
                     throws java.lang.Exception
Tests a "normal" invitation acceptance use case:

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

testInvitation2

public void testInvitation2()
                     throws java.lang.Exception
Just like testNormalInvitation1, but we use the invite() method to invite testUser2 after the project has already been defined.

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

testInvitation3

public void testInvitation3()
                     throws java.lang.Exception
We now test that if testUser2 declines the invitation, the project representation no longer contains testUser2.

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

testMultiProjectMemberDataAccess

public void testMultiProjectMemberDataAccess()
                                      throws java.lang.Exception
Tests that we can send data from two different users and retrieve it as part of a joint project.

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