Search in sources :

Example 1 with UnknownUser

use of org.ow2.petals.components.flowable.generic._1.UnknownUser in project petals-se-flowable by petalslink.

the class GetUserInvocationTest method unkownUser.

/**
 * <p>
 * Check the processing of the integration service {@link GetUserOperation} when:
 * </p>
 * <ul>
 * <li>valid arguments are given to retrieve an unknown user</li>
 * </ul>
 * <p>
 * Expected results:
 * </p>
 * <ul>
 * <li>no error occurs</li>
 * <li>fault 'Unknown User' is returned</li>
 * </ul>
 */
@Test
public void unkownUser() throws Exception {
    final String userId = "unknown-user";
    final GetUser bean = new GetUser();
    bean.setId(userId);
    final Object getUserRespObj = this.testRequestWithFault(NATIVE_USER_SVC_CFG, ITG_USER_PORT_TYPE, ITG_USER_SERVICE, ITG_OP_GETUSER, bean);
    assertTrue(getUserRespObj instanceof UnknownUser);
    assertEquals(userId, ((UnknownUser) getUserRespObj).getId());
}
Also used : UnknownUser(org.ow2.petals.components.flowable.generic._1.UnknownUser) GetUser(org.ow2.petals.components.flowable.generic._1.GetUser) Test(org.junit.Test)

Example 2 with UnknownUser

use of org.ow2.petals.components.flowable.generic._1.UnknownUser in project petals-se-flowable by petalslink.

the class UnknownUserException method getBean.

@Override
public Object getBean() {
    final UnknownUser bean = new UnknownUser();
    bean.setId(this.userId);
    return bean;
}
Also used : UnknownUser(org.ow2.petals.components.flowable.generic._1.UnknownUser)

Aggregations

UnknownUser (org.ow2.petals.components.flowable.generic._1.UnknownUser)2 Test (org.junit.Test)1 GetUser (org.ow2.petals.components.flowable.generic._1.GetUser)1