コード例 #1
0
 public void testOptionalResources() throws ProcessingException, URISyntaxException, IOException {
   final AbstractOutputDocument output =
       this.controller.getOutputDocument(new URI(OPTIONAL_RESOURCES_REQUEST_URI));
   assertNotNull("We should have a result document from optional requests", output);
   assertTrue(
       "Content is not as expected",
       output.getContentAsString().contains("http://www.w3.org/2002/06/xhtml2"));
 }
コード例 #2
0
 public void testVariableSubstitution()
     throws ProcessingException, URISyntaxException, IOException {
   final AbstractOutputDocument output =
       this.controller.getOutputDocument(new URI(VARIABLE_SUBSTITUTION_REQUEST_URI));
   assertNotNull(output);
   assertTrue(
       "Content is not as expected",
       output.getContentAsString().contains("http://www.w3.org/2002/06/xhtml2"));
 }
コード例 #3
0
 public void testForrestInternalRequest()
     throws ProcessingException, URISyntaxException, IOException {
   final AbstractOutputDocument output =
       this.controller.getOutputDocument(new URI(INTERNAL_REQUEST_URI));
   assertNotNull(output);
   assertTrue(
       "Content is not as expected",
       output.getContentAsString().contains("http://www.w3.org/2002/06/xhtml2"));
 }
コード例 #4
0
 public void testProcessRequest() throws IOException, ProcessingException, URISyntaxException {
   final AbstractOutputDocument output =
       this.controller.getOutputDocument(new URI(XHTML_REQUEST_URI));
   assertNotNull(output);
   assertTrue(
       "Content is not as expected",
       output.getContentAsString().contains("<title>XHTML 2 Simple Sample Page"));
   assertFalse(
       "Content is not as expected", output.getContentAsString().contains("xml-stylesheet"));
 }
コード例 #5
0
 public void testAggregatedResources()
     throws ProcessingException, URISyntaxException, IOException {
   final AbstractOutputDocument output =
       this.controller.getOutputDocument(new URI(AGGREGATED_RESOURCES_REQUEST_URI));
   assertNotNull("No document returned", output);
   assertTrue(
       "Content is not as expected",
       output.getContentAsString().contains("http://www.w3.org/2002/06/xhtml2"));
   String content = output.getContentAsString();
   assertTrue("Content is not as expected", content.contains("Second Sample"));
 }
コード例 #6
0
 public void testForrestPipelineRequest()
     throws ProcessingException, URISyntaxException, IOException {
   final AbstractOutputDocument output =
       this.controller.getOutputDocument(new URI(PIPELINE_REQUEST_URI));
   assertNotNull(output);
   assertTrue(
       "Content does not appear to be a pipeline description",
       output.getContentAsString().contains("forrestPipeline"));
   assertTrue(
       "Pipeline does not define source location",
       output.getContentAsString().contains("<source"));
   assertTrue(
       "Pipeline does not define a reader", output.getContentAsString().contains("<reader"));
   assertTrue(
       "Pipeline does not define an input plugin",
       output.getContentAsString().contains("<inputPlugin"));
   assertTrue(
       "Pipeline does not define an output plugin",
       output.getContentAsString().contains("<outputPlugin"));
 }