use of org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlLocationTest method checkUrlAutoCompletion.
@Test
public void checkUrlAutoCompletion() throws NamingException, MalformedURLException {
TomcatParseBpmPlatformXmlStep tomcatParseBpmPlatformXmlStep = new TomcatParseBpmPlatformXmlStep();
String correctedUrl = tomcatParseBpmPlatformXmlStep.autoCompleteUrl(BPM_PLATFORM_XML_LOCATION_VALID_PATH_UNIX);
assertEquals(BPM_PLATFORM_XML_LOCATION_VALID_PATH_UNIX + "/" + BPM_PLATFORM_XML_FILE, correctedUrl);
correctedUrl = tomcatParseBpmPlatformXmlStep.autoCompleteUrl(BPM_PLATFORM_XML_LOCATION_VALID_PATH_UNIX + "/");
assertEquals(BPM_PLATFORM_XML_LOCATION_VALID_PATH_UNIX + "/" + BPM_PLATFORM_XML_FILE, correctedUrl);
correctedUrl = tomcatParseBpmPlatformXmlStep.autoCompleteUrl(BPM_PLATFORM_XML_LOCATION_VALID_PATH_WINDOWS);
assertEquals(BPM_PLATFORM_XML_LOCATION_VALID_PATH_WINDOWS + "\\" + BPM_PLATFORM_XML_FILE, correctedUrl);
}
use of org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlLocationTest method checkValidBpmPlatformXmlResourceLocationForUrl.
@Test
public void checkValidBpmPlatformXmlResourceLocationForUrl() throws NamingException, MalformedURLException {
TomcatParseBpmPlatformXmlStep tomcatParseBpmPlatformXmlStep = new TomcatParseBpmPlatformXmlStep();
assertNull(tomcatParseBpmPlatformXmlStep.checkValidUrlLocation(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION));
assertNull(tomcatParseBpmPlatformXmlStep.checkValidUrlLocation(BPM_PLATFORM_XML_LOCATION_FILE_INVALID_PATH_WINDOWS));
assertNull(tomcatParseBpmPlatformXmlStep.checkValidUrlLocation(BPM_PLATFORM_XML_LOCATION_FILE_INVALID_PATH_UNIX));
assertNull(tomcatParseBpmPlatformXmlStep.checkValidUrlLocation(BPM_PLATFORM_XML_LOCATION_VALID_PATH_WINDOWS));
assertNull(tomcatParseBpmPlatformXmlStep.checkValidUrlLocation(BPM_PLATFORM_XML_LOCATION_VALID_PATH_UNIX));
URL httpUrl = tomcatParseBpmPlatformXmlStep.checkValidUrlLocation(BPM_PLATFORM_XML_LOCATION_URL_HTTP_PROTOCOL);
assertEquals(BPM_PLATFORM_XML_LOCATION_URL_HTTP_PROTOCOL, httpUrl.toString());
URL httpsUrl = tomcatParseBpmPlatformXmlStep.checkValidUrlLocation(BPM_PLATFORM_XML_LOCATION_URL_HTTPS_PROTOCOL);
assertEquals(BPM_PLATFORM_XML_LOCATION_URL_HTTPS_PROTOCOL, httpsUrl.toString());
}
use of org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlLocationTest method lookupBpmPlatformXml.
@Test
public void lookupBpmPlatformXml() throws NamingException, MalformedURLException {
Context context = new InitialContext();
context.bind("java:comp/env/" + BPM_PLATFORM_XML_LOCATION, BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION);
URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXml();
assertEquals(new File(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION).toURI().toURL(), url);
}
use of org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlLocationTest method checkValidBpmPlatformXmlResourceLocation.
@Test
public void checkValidBpmPlatformXmlResourceLocation() throws NamingException, MalformedURLException {
URL url = new TomcatParseBpmPlatformXmlStep().checkValidBpmPlatformXmlResourceLocation(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION);
assertEquals(new File(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION).toURI().toURL(), url);
}
use of org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlLocationTest method bpmPlatformXmlLocationNotRegisteredInJndi.
@Test
public void bpmPlatformXmlLocationNotRegisteredInJndi() throws NamingException {
URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXmlLocationFromJndi();
assertNull(url);
}
Aggregations