Examples of extract()


Examples of org.junithelper.core.extractor.ClassMetaExtractor.extract()

        Configuration config = new Configuration();
        config.mockObjectFramework = MockObjectFramework.JMockit;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        ClassMetaExtractor classMetaExtractor = new ClassMetaExtractor(config);
        String sourceCodeString = "package hoge.foo; import java.util.List; import java.util.Map; public class Sample { public int doSomething(String str, long longValue, List<String> list, Map<String,Object> map, java.util.HashMap<String, String> hashMap) throws Throwable { System.out.println(\"aaaa\") } }";
        ClassMeta targetClassMeta = classMetaExtractor.extract(sourceCodeString);
        target.initialize(targetClassMeta);
        MethodMeta targetMethodMeta = targetClassMeta.methods.get(0);
        TestMethodMeta testMethodMeta = target.getTestMethodMeta(targetMethodMeta);
        // when
        // then
View Full Code Here

Examples of org.junithelper.core.extractor.ImportedListExtractor.extract()

        Configuration config = new Configuration();
        ImportedListExtractor target = new ImportedListExtractor(config);
        // given
        String sourceCodeString = "package foo.var; import java.util.List; import java.io.InputStream; public class Sample { }";
        // when
        List<String> actual = target.extract(sourceCodeString);
        // then
        assertEquals(2, actual.size());
    }

    @Test
View Full Code Here

Examples of org.junithelper.core.extractor.MethodMetaExtractor.extract()

    @Test
    public void extract_A$String_StringIsEmpty() throws Exception {
        MethodMetaExtractor target = new MethodMetaExtractor(config);
        String sourceCodeString = "";
        List<MethodMeta> actual = target.extract(sourceCodeString);
        assertThat(actual, notNullValue());
    }

    @Test
    public void isPrivateFieldExists_A$String$String$String_StringIsNull() throws Exception {
View Full Code Here

Examples of org.junithelper.core.meta.extractor.ClassMetaExtractor.extract()

    List<File> dest = new ArrayList<File>();
    ClassMetaExtractor extractor = new ClassMetaExtractor(config);
    if (dirOrFile.matches(".+\\.java$")) {
      File file = new File(dirOrFile);
      String encoding = UniversalDetectorUtil.getDetectedEncoding(file);
      ClassMeta classMeta = extractor.extract(IOUtil.readAsString(new FileInputStream(file), encoding));
      if (!classMeta.isAbstract) {
        dest.add(file);
      }
    } else {
      List<File> javaFiles = new ArrayList<File>();
View Full Code Here

Examples of org.nasutekds.quicksetup.util.ZipExtractor.extract()

          setCurrentProgressStep(UpgradeProgressStep.EXTRACTING);
          if (isVerbose())
          {
            notifyListeners(getLineBreak());
          }
          extractor.extract(getStageDirectory());
          if (!isVerbose())
          {
            notifyListeners(getFormattedDoneWithLineBreak());
          }
          else
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.RestTableResultExtractor.extract()

        if (result==null) throw new IllegalStateException("Result not yet available, please finish the transaction first.");
    }

    public static QueryResultBuilder<Map<String, Object>> toQueryResult(CypherResult responseData, RestAPI restApi, ResultConverter resultConverter) {
        final RestTableResultExtractor extractor = new RestTableResultExtractor(restApi.getEntityExtractor());
        final List<Map<String, Object>> data = extractor.extract(responseData.asMap());
        return new QueryResultBuilder<>(data, resultConverter);
    }
}
View Full Code Here

Examples of org.pdfclown.tools.TextExtractor.extract()

        if(annotation instanceof Link)
        {
          linkFound = true;

          if(textStrings == null)
          {textStrings = extractor.extract(page);}

          Link link = (Link)annotation;
          Rectangle2D linkBox = link.getBox();

          // Text.
View Full Code Here

Examples of org.semanticdesktop.aperture.extractor.Extractor.extract()

            Extractor extractor = factory.get();
            RDFContainerFactory containerFactory =
                new RDFContainerFactoryImpl();
            RDFContainer container =
                containerFactory.getRDFContainer(docId);
            extractor.extract(
                container.getDescribedUri(),
                new BufferedInputStream(in, 8192),
                null, mimeType, container);
            in.close();
            result = container.getModel();
View Full Code Here

Examples of org.semanticweb.owlapi.modularity.OntologySegmenter.extract()

  private void modularityTest(OWLOntology ontology, Set<OWLEntity> signature, ModuleType moduleType) throws OWLException {
    Set<OWLAxiom> computed = ModularityUtils.extractModule( ontology, signature, moduleType );
   
    OntologySegmenter segmenter =
      new SyntacticLocalityModuleExtractor( manager, ontology, moduleType );
    Set<OWLAxiom> expected = segmenter.extract( signature );
     
    // prune declarations to avoid mismatches related to declarations
    for( OWLEntity entity : signature ) {
      OWLDeclarationAxiom declaration = OWL.declaration( entity );
      computed.remove( declaration );
View Full Code Here

Examples of org.spw.volunteer.report.xml.programme.ProgrammeAnalysisExtractor.extract()

       
        int year = 1900;
        String[] statusCodes = new String[] {"UG", "PG", "SL", "SPW", "N/A"};
        ProgrammeAnalysisExtractor instance = new ProgrammeAnalysisExtractor(statusCodes);
       
        ProgrammeAnalysis[] result = instance.extract(year);
        assertEquals(1, result.length);
        assertEquals(statusCodes.length, result[0].getNumberByStatus().length);
        assertEquals(1, result[0].getNumberByStatus()[1]); //PG
       
    }
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.