Package cn.org.rapid_framework.generator.provider.java.model.JavaMethod

Examples of cn.org.rapid_framework.generator.provider.java.model.JavaMethod.JavaMethodInvokeSequencesParser


public class JavaMethodInvokeFlowsTest extends TestCase{
 
  public void test_get_JavaMethodInvokeFlows() {
    JavaClass clazz = new JavaClass(GeneratorFacade.class);
    JavaMethod method = clazz.getMethod("deleteOutRootDir");
    JavaMethodInvokeSequencesParser executor = new JavaMethodInvokeSequencesParser(method,clazz.getMavenJavaSourceFileContent());
   
    executor.execute();
    List<FieldMethodInvocation> invokes = executor.getMethodInvokeSequences();
    System.out.println(invokes);
   
    verifyInvokeFlows(invokes,"generator.deleteOutRootDir");
  }
View Full Code Here


  }
 
  public void test_get_JavaMethodInvokeFlows_no_execute() {
    JavaClass clazz = new JavaClass(GeneratorFacade.class);
    JavaMethod method = clazz.getMethod("deleteOutRootDir");
    JavaMethodInvokeSequencesParser executor = new JavaMethodInvokeSequencesParser(method,clazz.getMavenJavaSourceFileContent());
    try {
      List<FieldMethodInvocation> invokes = executor.getMethodInvokeSequences();
      fail("还没有执行execute()方法");
    }catch(IllegalStateException e) {
    }
  }
View Full Code Here

  }
 
  public void test_getMethodInvokeSequences(String methodName,Class clazz, String... expected) {
    JavaClass javaClazz = new JavaClass(clazz);
    JavaMethod method = javaClazz.getMethod(methodName);
    JavaMethodInvokeSequencesParser executor = new JavaMethodInvokeSequencesParser(method,IOHelper.readFile(new File(javaClazz.getMavenJavaSourceFile())));
   
    executor.execute();
    List<FieldMethodInvocation> invokes = executor.getMethodInvokeSequences();
    System.out.println(invokes);
   
    verifyInvokeFlows(invokes,expected);
  }
View Full Code Here

TOP

Related Classes of cn.org.rapid_framework.generator.provider.java.model.JavaMethod.JavaMethodInvokeSequencesParser

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.