use of com.box.sdk.EmailAlias in project camel by apache.
the class BoxUsersManagerIntegrationTest method testDeleteUserEmailAlias.
@Ignore
@Test
public void testDeleteUserEmailAlias() throws Exception {
EmailAlias emailAlias = null;
try {
emailAlias = testUser.addEmailAlias(CAMEL_TEST_USER_EMAIL_ALIAS);
} catch (BoxAPIException e) {
throw new RuntimeException(String.format("Box API returned the error code %d\n\n%s", e.getResponseCode(), e.getResponse()), e);
}
final Map<String, Object> headers = new HashMap<String, Object>();
// parameter type is String
headers.put("CamelBox.userId", testUser.getID());
// parameter type is String
headers.put("CamelBox.emailAliasId", emailAlias.getID());
requestBodyAndHeaders("direct://DELETEUSEREMAILALIAS", null, headers);
assertNotNull("deleteUserEmailAlias email aliases", testUser.getEmailAliases());
assertEquals("deleteUserEmailAlias email aliases", 0, testUser.getEmailAliases().size());
}
Aggregations