use of org.pentaho.platform.plugin.services.webservices.content.StyledHtmlAxisServiceLister in project pentaho-platform by pentaho.
the class AxisWebServiceManagerIT method testListingPageStyled.
@Test
public void testListingPageStyled() throws Exception {
MockServletContext context = new MockServletContext();
context.addResourcePaths("/", Arrays.asList("test-module/"));
context.addResourcePaths("/test-module/", Arrays.asList("themes.xml"));
context.addResourcePaths("/test-module/themes/onyx/", Arrays.asList("styles.css"));
File themesDotXML = new File(microPlatform.getFilePath() + "system/axis/themes.xml");
context.setResource("/test-module/themes.xml", themesDotXML.toURI().toURL());
context.setResourceAsStream("/test-module/themes.xml", new FileInputStream(themesDotXML));
File styleDotSCC = new File(microPlatform.getFilePath() + "system/axis/themes/onyx/styles.css");
context.setResource("/test-module/themes/onyx/styles.css", styleDotSCC.toURI().toURL());
context.setResourceAsStream("/test-module/themes/onyx/styles.css", new FileInputStream(styleDotSCC));
PentahoSystem.getApplicationContext().setContext(context);
IContentGenerator serviceLister = new StyledHtmlAxisServiceLister();
String html = ContentGeneratorUtil.getContentAsString(serviceLister);
System.out.println(html);
assertTrue("style is missing", html.contains("styles.css"));
}
use of org.pentaho.platform.plugin.services.webservices.content.StyledHtmlAxisServiceLister in project pentaho-platform by pentaho.
the class AxisWebServiceManagerIT method testMetaInf.
@Test
public void testMetaInf() throws Exception {
IContentGenerator serviceLister = new StyledHtmlAxisServiceLister();
String html = ContentGeneratorUtil.getContentAsString(serviceLister);
System.out.println(html);
assertTrue("title is not displayed", html.contains("junit echo service"));
}
use of org.pentaho.platform.plugin.services.webservices.content.StyledHtmlAxisServiceLister in project pentaho-platform by pentaho.
the class AxisWebServiceManagerIT method testExecuteUrlListed.
/*
* The following tests are checking that the HtmlServiceLister (content generator) outputs the correct meta
* information about the services defined in the test plugin. They are integration tests in the sense that all the
* work of registering the plugin that defines the services and content generators is done by actual platform modules
* as it would normally happen, and is not mocked for these tests.
*/
@Test
public void testExecuteUrlListed() throws Exception {
IContentGenerator serviceLister = new StyledHtmlAxisServiceLister();
String html = ContentGeneratorUtil.getContentAsString(serviceLister);
System.out.println(html);
assertTrue("Run URL is missing", html.contains("/content/ws-run/echoService"));
}
use of org.pentaho.platform.plugin.services.webservices.content.StyledHtmlAxisServiceLister in project pentaho-platform by pentaho.
the class AxisWebServiceManagerIT method testWsdlUrlListed.
@Test
public void testWsdlUrlListed() throws Exception {
IContentGenerator serviceLister = new StyledHtmlAxisServiceLister();
String html = ContentGeneratorUtil.getContentAsString(serviceLister);
System.out.println(html);
assertTrue("WSDL URL is missing", html.contains("/content/ws-wsdl/echoService"));
}
Aggregations