Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;

import org.junit.Assert;
import org.junit.Test;

import com.bitheads.braincloud.client.ReasonCodes;
import com.bitheads.braincloud.client.ServiceName;
import com.bitheads.braincloud.client.ServiceOperation;
import com.bitheads.braincloud.client.StatusCodes;

public class BrainCloudWrapperTest extends TestFixtureNoAuth {

@Test
Expand Down Expand Up @@ -134,4 +140,44 @@ public void logOutRememberUser(){
System.out.println("Verifying that the STORED PROFILE ID was saved (i.e. not forgotten)");
assertEquals(profileID, _wrapper.getStoredProfileId());
}

@Test
public void ReasonCodeAccess(){
int reasonCode = ReasonCodes.MERGE_PROFILES;
int expectedValue = 40212;

System.out.println("Reason Code MERGE_PROFILES = " + reasonCode);

Assert.assertEquals(expectedValue, reasonCode);
}

@Test
public void ServiceNameAccess(){
String serviceName = ServiceName.appStore.name();
String expectedValue = "appStore";

System.out.println("Service Name appStore = " + serviceName);

Assert.assertEquals(expectedValue, serviceName);
}

@Test
public void ServiceOperationAccess(){
String serviceOperation = ServiceOperation.ABANDON.name();
String expectedValue = "ABANDON";

System.out.println("Service Operation ABANDON = " + serviceOperation);

Assert.assertEquals(expectedValue, serviceOperation);
}

@Test
public void StatusCodeAccess(){
int statusCode = StatusCodes.CLIENT_NETWORK_ERROR;
int expectedValue = 900;

System.out.println("Status Code CLIENT_NETWORK_ERROR = " + statusCode);

Assert.assertEquals(expectedValue, statusCode);
}
}