use of org.apache.camel.component.bonita.api.util.BonitaAPIConfig in project camel by apache.
the class BonitaAPITest method testStartCaseNUllContractInput.
@Test(expected = IllegalArgumentException.class)
public void testStartCaseNUllContractInput() throws Exception {
BonitaAPI bonitaApi = BonitaAPIBuilder.build(new BonitaAPIConfig("hostname", "port", "username", "password"));
ProcessDefinitionResponse processDefinition = new ProcessDefinitionResponse();
bonitaApi.startCase(processDefinition, null);
}
use of org.apache.camel.component.bonita.api.util.BonitaAPIConfig in project camel by apache.
the class BonitaAuthFilterAlreadyConnectedTest method testAlreadyConnected.
@Test
public void testAlreadyConnected() throws Exception {
BonitaAPIConfig bonitaApiConfig = new BonitaAPIConfig("hostname", "port", "username", "password");
BonitaAuthFilter bonitaAuthFilter = new BonitaAuthFilter(bonitaApiConfig);
bonitaAuthFilter.filter(requestContext);
}
use of org.apache.camel.component.bonita.api.util.BonitaAPIConfig in project camel by apache.
the class BonitaAuthFilterConnectionTest method testConnection.
@Test
public void testConnection() throws Exception {
String port = wireMockRule.port() + "";
stubFor(post(urlEqualTo("/bonita/loginservice")).willReturn(aResponse().withHeader("Set-Cookie", "JSESSIONID=something")));
BonitaAPIConfig bonitaApiConfig = new BonitaAPIConfig("localhost", port, "username", "password");
BonitaAuthFilter bonitaAuthFilter = new BonitaAuthFilter(bonitaApiConfig);
bonitaAuthFilter.filter(requestContext);
assertEquals(1, requestContext.getHeaders().size());
}
use of org.apache.camel.component.bonita.api.util.BonitaAPIConfig in project camel by apache.
the class BonitaAuthFilterTest method testBonitaAuthFilterPasswordEmpty.
@Test(expected = IllegalArgumentException.class)
public void testBonitaAuthFilterPasswordEmpty() throws IOException {
BonitaAPIConfig bonitaApiConfig = new BonitaAPIConfig("localhost", "port", "username", "");
BonitaAuthFilter bonitaAuthFilter = new BonitaAuthFilter(bonitaApiConfig);
bonitaAuthFilter.filter(requestContext);
}
Aggregations