Package cn.shenyanchao.ut.command.invoker

Examples of cn.shenyanchao.ut.command.invoker.CommandInvoker.action()


        CompilationUnitBuilder compilationUnitBuilder = null;
        String testJavaFileName = JavaParserUtils.findTestJavaFileName(sourceCU, javaFile, testDir);
        boolean testExist = FileChecker.isTestJavaClassExist(new File(testJavaFileName));
        if (!testExist) {
            CommandInvoker invoker = new CommandInvoker(new NewTestCommand(new NewTestReceiver(sourceCU, javaFile)));
            compilationUnitBuilder = invoker.action();
        } else if (testExist) {
            CompilationUnit testCU = JavaParserFactory.getCompilationUnit(new File(testJavaFileName), sourceEncode);
            CommandInvoker invoker = new CommandInvoker(new ExistTestCommand(new ExistTestReceiver(sourceCU, javaFile,
                    testCU)));
            compilationUnitBuilder = invoker.action();
View Full Code Here


            compilationUnitBuilder = invoker.action();
        } else if (testExist) {
            CompilationUnit testCU = JavaParserFactory.getCompilationUnit(new File(testJavaFileName), sourceEncode);
            CommandInvoker invoker = new CommandInvoker(new ExistTestCommand(new ExistTestReceiver(sourceCU, javaFile,
                    testCU)));
            compilationUnitBuilder = invoker.action();
        }

        if (null != compilationUnitBuilder){
            CompilationUnit testCU = compilationUnitBuilder.build();
            //写入测试代码文件
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.