Examples of performTest()


Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

      AnnotationFS annotation = cas.createAnnotation(cas.getAnnotationType(), 0, 9);
      cas.addFsToIndexes(annotation);

      /* execute Solrcas on the created CAS*/
      annotatorTester.performTest(cas);

      /* create a Solr instance to check document has been indexed as expected */
      URL solrURL = this.getClass().getResource("/org/apache/uima/solrcas/");
      System.setProperty("solr.solr.home", new File(solrURL.toURI()).getAbsolutePath());
      CoreContainer.Initializer initializer = new CoreContainer.Initializer();
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

  @Test
  public void integrationTest() {
    try {
      CAS cas = prepareCAS();
      AnnotatorTester annotatorTester = new AnnotatorTester(markupAnnotatorDescPath);
      CAS newCas = annotatorTester.performTest(cas);
      for (Annotation annotation : newCas.getCurrentView().getJCas().getAnnotationIndex(
              org.apache.uima.tika.MarkupAnnotation.type)) {
        Type type = annotation.getType();
        assertTrue(annotation.getType().getName() != null);
        assertTrue(annotation.getBegin() >= 0);
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

    final int max = 20;
    for (int i = 0; i < max; i++) {
      // create annotation tester with the regex annotator specifier
      AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
          .getFile("conceptFileLocking/repeatDescriptor.xml"));
      CAS cas = annotTester.performTest("Test a regex.", "en");
      // Document annotation and one "a" found.
      assertTrue(cas.getAnnotationIndex().size() == 2);
      try {
        org.apache.commons.io.FileUtils.forceDelete(conceptFile);
        BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(conceptFile));
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

  public void testEmptyRegex() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
        .getFile("emptyRegex/RegExEmptyRegex.xml"));
    CAS cas = annotTester.performTest("Test an empty regex.", "en");

//    // define result interested in
//    String[] tofs = { "org.apache.uima.TestAnnot", "org.apache.uima.TestAnnot:testFeature",
//        "org.apache.uima.TestAnnot:testFeature1", "org.apache.uima.TestAnnot1",
//        "org.apache.uima.TestAnnot1:testFeature", "org.apache.uima.TestAnnot1:testFeature1",
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest.performTest()

      Service service = Service.create(wsdlURL, SERVICE_NAME);
      SchemaValidationFeature feature = new SchemaValidationFeature(xsdURL.toString());
      MyTest port = service.getPort(MyTest.class, feature);
      try
      {
         port.performTest(new Long(2000));
      }
      catch (Exception ex)
      {
         StringWriter stwr = new StringWriter();
         ex.printStackTrace(new PrintWriter(stwr));
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest.performTest()

     
      TestErrorHandler errorHandler = new TestErrorHandler();
      feature.setErrorHandler(errorHandler);
     
      MyTest port = service.getPort(MyTest.class, feature);
      port.performTest(new Long(2000));
     
      String msg = errorHandler.getErrors();
      assertTrue("Unexpectd message: " + msg, msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive '1000'") > 0);
   }
  
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest.performTest()

   {
      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/noval?wsdl");
     
      Service service = Service.create(wsdlURL, SERVICE_NAME);
      MyTest port = service.getPort(MyTest.class);
      port.performTest(new Long(1000));
      port.performTest(new Long(2000));
   }
  
   public void testValidatingEndpoint() throws Exception
   {
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest.performTest()

      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/noval?wsdl");
     
      Service service = Service.create(wsdlURL, SERVICE_NAME);
      MyTest port = service.getPort(MyTest.class);
      port.performTest(new Long(1000));
      port.performTest(new Long(2000));
   }
  
   public void testValidatingEndpoint() throws Exception
   {
      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/doval?wsdl");
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest.performTest()

   {
      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/doval?wsdl");
     
      Service service = Service.create(wsdlURL, SERVICE_NAME);
      MyTest port = service.getPort(MyTest.class);
      port.performTest(new Long(1000));
      try
      {
         port.performTest(new Long(2000));
      }
      catch (Exception ex)
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest.performTest()

      Service service = Service.create(wsdlURL, SERVICE_NAME);
      MyTest port = service.getPort(MyTest.class);
      port.performTest(new Long(1000));
      try
      {
         port.performTest(new Long(2000));
      }
      catch (Exception ex)
      {
         String msg = ex.getMessage();
         assertTrue("Unexpectd message: " + ex.getMessage(), msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive '1000'") > 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.