test/org/ohmage/test/user/UserApiTests.java
public void test(final String adminAuthToken) throws ApiException {
		try {
			api.createUser(adminAuthToken, Controller.CLIENT, 
					username, password, null, true, null, null);

			// Test change password.
			testPasswordChange();
		}
		finally {
			// Cleanup
			Collection<String> usernames = new ArrayList<String>(1);
			usernames.add(username);
			api.deleteUser(adminAuthToken, Controller.CLIENT, usernames);
		}
		
		try {
			api.createUser(adminAuthToken, Controller.CLIENT, 
					username, password, null, null, null, null);

			// Test update and read.
			testUserUpdateAndPersonalRead(adminAuthToken);
		}
		finally {
			// Cleanup
			Collection<String> usernames = new ArrayList<String>(1);
			usernames.add(username);
			api.deleteUser(adminAuthToken, Controller.CLIENT, usernames);
		}
	}
/**
	 * Tests all parameters and then begins creating, editing, and deleting
	 * usernames.
	 * 
	 * @param adminAuthToken An administrators authentication token to use when
	 * 						 creating and deleting users for testing.
	 * 
	 * @throws ApiException Thrown if there is a library error which should
	 * 						never happen.
	 */
Tests all parameters and then begins creating, editing, and deleting
usernames.

@param adminAuthToken An administrators authentication token to use when
creating and deleting users for testing.

@throws ApiException Thrown if there is a library error which should
never happen.
Tests all parameters and then begins creating editing and deleting usernames . @param adminAuthToken An administrators authentication token to use when creating and deleting users for testing . @throws ApiException Thrown if there is a library error which should never happen .
public void test(final String adminAuthToken) throws ApiException {
		try {
			api.createUser(adminAuthToken, Controller.CLIENT, 
					username, password, null, true, null, null);
			testPasswordChange();
		}
		finally {
			Collection<String> usernames = new ArrayList<String>(1);
			usernames.add(username);
			api.deleteUser(adminAuthToken, Controller.CLIENT, usernames);
		}
		try {
			api.createUser(adminAuthToken, Controller.CLIENT, 
					username, password, null, null, null, null);
			testUserUpdateAndPersonalRead(adminAuthToken);
		}
		finally {
			Collection<String> usernames = new ArrayList<String>(1);
			usernames.add(username);
			api.deleteUser(adminAuthToken, Controller.CLIENT, usernames);
		}
	}
public void test ( final String adminAuthToken ) throws ApiException { try { api . createUser ( adminAuthToken , Controller . CLIENT , username , password , null , true , null , null ) ; testPasswordChange ( ) ; } finally { Collection < String > usernames = new ArrayList < String > ( 1 ) ; usernames . add ( username ) ; api . deleteUser ( adminAuthToken , Controller . CLIENT , usernames ) ; } try { api . createUser ( adminAuthToken , Controller . CLIENT , username , password , null , null , null , null ) ; testUserUpdateAndPersonalRead ( adminAuthToken ) ; } finally { Collection < String > usernames = new ArrayList < String > ( 1 ) ; usernames . add ( username ) ; api . deleteUser ( adminAuthToken , Controller . CLIENT , usernames ) ; } }
Tests all parameters and then begins creating, editing, and deleting
 usernames.
Tests all parameters and then begins creating editing and deleting usernames .
// Test change password. // Cleanup // Test update and read. // Cleanup