Search in sources :

Example 1 with RuntimeInfoService

use of org.apache.archiva.web.api.RuntimeInfoService in project archiva by apache.

the class RuntimeInfoServiceTest method runtimeInfoService.

@Test
public void runtimeInfoService() throws Exception {
    RuntimeInfoService service = JAXRSClientFactory.create(getBaseUrl() + "/" + getRestServicesPath() + "/archivaUiServices/", RuntimeInfoService.class, Collections.singletonList(new JacksonJaxbJsonProvider()));
    WebClient.client(service).header("Referer", "http://localhost");
    ApplicationRuntimeInfo applicationRuntimeInfo = service.getApplicationRuntimeInfo("en");
    assertEquals(System.getProperty("expectedVersion"), applicationRuntimeInfo.getVersion());
    assertFalse(applicationRuntimeInfo.isJavascriptLog());
    assertTrue(applicationRuntimeInfo.isLogMissingI18n());
}
Also used : ApplicationRuntimeInfo(org.apache.archiva.web.model.ApplicationRuntimeInfo) RuntimeInfoService(org.apache.archiva.web.api.RuntimeInfoService) JacksonJaxbJsonProvider(com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider) AbstractRestServicesTest(org.apache.archiva.redback.rest.services.AbstractRestServicesTest) Test(org.junit.Test)

Aggregations

JacksonJaxbJsonProvider (com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider)1 AbstractRestServicesTest (org.apache.archiva.redback.rest.services.AbstractRestServicesTest)1 RuntimeInfoService (org.apache.archiva.web.api.RuntimeInfoService)1 ApplicationRuntimeInfo (org.apache.archiva.web.model.ApplicationRuntimeInfo)1 Test (org.junit.Test)1