Package org.kite9.tool

Examples of org.kite9.tool.BasicKite9Runner


  @Test
  public void test_1_14_AnnotationReference() throws Exception {
    Set<AnnotationHandle> refs = pm.getAnnotationReferences(convertName(Refs.Referenced.class));
    Method m = Refs.class.getMethod("referencer");
    MethodHandle mh = new MethodHandle(m);
    Reference ref = m.getAnnotation(Reference.class);
    AnnotationHandle expected = new AnnotationHandle(ref, mh, "refs");
    Assert.assertTrue(refs.contains(expected));
  }
View Full Code Here


    Assert.assertFalse(deps.contains(convertName(Map.class)));
  }

  @Test
  public void test_1_13_PackageDependency() throws IOException {
    PackageHandle sub1 = new PackageHandle(SubPackageDependency.class);
    PackageHandle sub2 = new PackageHandle(SubPackageDependency2.class);
    PackageHandle current = new PackageHandle(this.getClass());

    Assert.assertTrue(pm.getDependsOnPackages(sub1).contains(current));
    Assert.assertTrue(pm.getDependsOnPackages(sub2).contains(current));
    Assert.assertTrue(pm.getDependedOnPackages(current).contains(sub1));
    Assert.assertTrue(pm.getDependedOnPackages(current).contains(sub2))
View Full Code Here

  pmi.addClass(convertClassName(Test4Package.class))
  Package p = this.getClass().getPackage();
  pmi.addPackageClass(convertPackageName(p), convertClassName(Test3Field.class));
  pmi.addPackageClass(convertPackageName(p), convertClassName(Test4Package.class));
  Package pack2= PropositionFormat.class.getPackage();
  PackageHandle p1 = new PackageHandle(convertPackageName(p), convertClassName(Test4Package.class));
  PackageHandle p2 = new PackageHandle(convertPackageName(pack2), convertClassName(PropositionFormat.class));
  pmi.addPackageDependency(p1, p2);
    }
View Full Code Here

      getContext().getLogger().send("Found: "+resources.length+" matches");

    }

    ProjectModelImpl model = cfmb.getModel();
   
    getContext().getLogger().send(
        "Created project model from \"" + getContext().getClassPath() + "\" with " + fileCount + " files and "
            + model.getClassCount() + " classes");

    return model;

  }
View Full Code Here

  protected Kite9Context ctx = createContext();

  protected static Kite9Context createContext() {
    Aliaser a = new PropertyAliaser();
    Repository<File> r = new BasicFileRepository();
    Kite9ContextImpl out = new Kite9ContextImpl(a, r);
    out.setClassPath("target/classes" + File.pathSeparator + "target/test-classes");
//    out.setProjectId(35);
//    out.setSecretKey("PFB9T1V97AK96WFK");
    out.afterPropertiesSet();
View Full Code Here

 
  protected ServerCallingBuildListener createServerCallingListener() {
    ServerCallingBuildListener scbl = new ServerCallingBuildListener();
    scbl.setContext(ctx);
    scbl.setServer(new AbstractLocalServer() {
      @Override
      protected void processItem(WorkItem workItem, ZipOutputStream zos) throws IOException {
        // just returns 'canned' responses from the test artifacts
        // directory
        File png = getFileFromWorkItem(workItem, "png");
View Full Code Here

  @Test
  public void test_2_1_JavadocModification() throws Exception {
    generateJavadocs();
   
    BasicKite9Runner bkr = new BasicKite9Runner();
    bkr.setScanners(createList((Scanner) createLocalClassScanner(createModel())));
    bkr.setContext(ctx);
    MockJavadocModifierListener mbl = new MockJavadocModifierListener();
    mbl.setContext(ctx);
    mbl.setDocRoot(TARGET_DOCS);
    bkr.setListeners(createList((BuildListener) mbl));
    bkr.process();
   
    String htmlFile = this.getClass().getName().replace(".", "/")+".html";
   
    String className = this.getClass().getCanonicalName();
   
View Full Code Here

  @Test
  public void test_1_1_JavadocDiagram() throws Exception {
    generateJavadocs();

    BasicKite9Runner bkr = new BasicKite9Runner();
    BasicClassScanner scs = createLocalClassScanner(createModel());
    scs.setBasePackage(Test1JavadocDiagram.class.getName());
    bkr.setScanners(HelpMethods.createList((Scanner) scs));
    bkr.setContext(ctx);
    Kite9DiagramJavadocListener mbl = new Kite9DiagramJavadocListener();
    mbl.setContext(ctx);
    mbl.setDocRoot(TARGET_DOCS);
    ServerCallingBuildListener scbl = createServerCallingListener();
    bkr.setListeners(createList((BuildListener) mbl, scbl));
    bkr.process();

    String htmlFile = this.getClass().getName().replace(".", "/") + ".html";

    try {
      FileDiff
View Full Code Here

    propsToUse.putAll(userProperties);
    getLog().info("Using Properties: " + propsToUse);

    Tool t = new Tool();
    GenericXmlApplicationContext context = t.createSpringContext(propsToUse, this.getClass().getClassLoader());
    BasicKite9Runner runner = (BasicKite9Runner) context.getBean(BasicKite9Runner.class);
    Kite9Context kite9Context = (Kite9Context) context.getBean(Kite9Context.class);

    boolean addMap = new File(propsToUse.getProperty("javadoc-listener.docRoot")).exists();

    final Map<String, WorkItem> toInclude = new LinkedHashMap<String, WorkItem>();

    runner.getListeners().add(new BuildListener() {

      public boolean canProcess(WorkItem designItem) {
        return true;
      }

      public void finished() {
      }

      public void process(WorkItem designItem) throws Exception {
        toInclude.put(prepareCaption(designItem), designItem);

      }

    });
    runner.process();

    try {
      createReport(getSink(), toInclude, kite9Context, addMap);
    } catch (IOException e) {
      throw new MavenReportException("Could not generate maven kite9 report: ", e);
View Full Code Here

public class Test2XMLFileScanner extends AbstractRunnerTest {

    @Test
    public void test_2_1_ScanDesignItems() throws Exception {
  BasicKite9Runner bkr = new BasicKite9Runner();
  bkr.setScanners(createList((Scanner) createLocalFileScanner()));
  bkr.setContext(ctx);
  BuildListener mbl = new MockXMLBuildListener(new String[] {
    "item xmlns=\"http://www.kite9.org/schema/adl\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" name=\"look\" subjectId=\"some.test.design.item\"",
    "<glyph id=\"project:org.kite9.diagram.builders.Test1Class\">",
    "<stereotype>class</stereotype>",
    "<label>Test1Class</label>"
  });
  bkr.setListeners(createList((mbl)));
  bkr.process();
    }
View Full Code Here

TOP

Related Classes of org.kite9.tool.BasicKite9Runner

Copyright © 2018 www.massapicom. 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.