Package org.kite9.tool

Examples of org.kite9.tool.BasicKite9Runner


  static final String LINE3 = "project_java_class:"+Test2DefaultScanner.class.getName();

  @Test
  public void test_2_1_ScanDesignItems() throws Exception {
    BasicKite9Runner bkr = new BasicKite9Runner();
    BasicClassScanner scanner = (BasicClassScanner) createLocalClassScanner(createModel());
    scanner.setBasePackage(this.getClass().getName());
    bkr.setScanners(createList((Scanner)scanner));
    bkr.setContext(ctx);
    MockBuildListener mbl = new MockBuildListener(new String[] {} );
    bkr.setListeners(createList((BuildListener) mbl));
    bkr.process();
    Assert.assertTrue("Should be something in the listener: ",mbl.getOut().toString().length() > 0);
  }
View Full Code Here


      return name;
  }

  @Test
  public void test_1_1_ScanDesignItems() throws Exception {
    BasicKite9Runner bkr = new BasicKite9Runner();
    bkr.setScanners(createList((Scanner) createLocalClassScanner(createModel())));
    bkr.setContext(ctx);
    BuildListener mbl = new MockBuildListener(new String[] {LINE1, LINE2, LINE3} );
    bkr.setListeners(createList((mbl)));
    bkr.process();
  }
View Full Code Here

    out.afterPropertiesSet();
    return out;
  }
 
  public static ProjectModel createModel() throws IOException {
    Kite9Context ctx = createContext();
    SpringProjectModelFactory fact = new SpringProjectModelFactory();
    fact.setContext(ctx);
    fact.setBasePackage(AbstractRunnerTest.class.getPackage().getName());
   
    return fact.createProjectModel();
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();
    return out;
  }
View Full Code Here

    return xfs;
  }

 
  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_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

    return out;
  }
 
  public static ProjectModel createModel() throws IOException {
    Kite9Context ctx = createContext();
    SpringProjectModelFactory fact = new SpringProjectModelFactory();
    fact.setContext(ctx);
    fact.setBasePackage(AbstractRunnerTest.class.getPackage().getName());
   
    return fact.createProjectModel();
      }
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);
View Full Code Here

   
    return fact.createProjectModel();
      }

  protected BasicClassScanner createLocalClassScanner(ProjectModel pm) {
    DefaultingClassScanner scs = new DefaultingClassScanner();
    scs.setContext(ctx);
    scs.setProjectModel(pm);
    scs.setBasePackage(this.getClass().getPackage().getName());
    return scs;
  }
View Full Code Here

    scs.setBasePackage(this.getClass().getPackage().getName());
    return scs;
  }

  protected XMLFileScanner createLocalFileScanner() {
    XMLFileScanner xfs = new XMLFileScanner();
    xfs.setContext(ctx);
    String folder = this.getClass().getPackage().getName();
    folder = folder.replace(".", "/");
    folder = "src/test/resources/"+folder;
    xfs.setBaseFolder(folder);
    return xfs;
  }
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.