Search in sources :

Example 1 with RestService

use of com.evolveum.midpoint.ninja.impl.RestService in project midpoint by Evolveum.

the class TestResourceRestAction method execute.

@Override
public void execute() {
    RestService model = context.getRestService();
    OperationResult result = model.testResource(options.getOid());
// todo print result
}
Also used : OperationResult(com.evolveum.midpoint.schema.result.OperationResult) RestService(com.evolveum.midpoint.ninja.impl.RestService)

Example 2 with RestService

use of com.evolveum.midpoint.ninja.impl.RestService in project midpoint by Evolveum.

the class NinjaContextTest method setupModelClient.

@Test
public void setupModelClient() throws Exception {
    NinjaContext ctx = new NinjaContext(null);
    ctx.init(null);
    RestService service = ctx.getRestService();
    Holder object = new Holder();
    Holder result = new Holder();
    // service.get(UserType.COMPLEX_TYPE, SystemObjectsType.USER_ADMINISTRATOR.value(), null, object, result);
    AssertJUnit.assertNotNull(object.value);
}
Also used : NinjaContext(com.evolveum.midpoint.ninja.impl.NinjaContext) Holder(javax.xml.ws.Holder) RestService(com.evolveum.midpoint.ninja.impl.RestService) Test(org.testng.annotations.Test)

Aggregations

RestService (com.evolveum.midpoint.ninja.impl.RestService)2 NinjaContext (com.evolveum.midpoint.ninja.impl.NinjaContext)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 Holder (javax.xml.ws.Holder)1 Test (org.testng.annotations.Test)1