use of org.xwiki.rest.internal.ModelFactory in project xwiki-platform by xwiki.
the class InstalledExtensionIndexTest method executeJob.
private void executeJob(String jobType, Request jobRequest) throws Exception {
JobRequest request = AbstractTest.componentManager.<ModelFactory>getInstance(ModelFactory.class).toRestJobRequest(jobRequest);
Map<String, Object[]> queryParameters = new HashMap<>();
queryParameters.put("jobType", new Object[] { jobType });
queryParameters.put("async", new Object[] { false });
TestUtils.assertStatusCodes(getUtil().rest().executePut(JobsResource.class, request, queryParameters), true, TestUtils.STATUS_OK);
}
Aggregations