private Summary executeAllAtOnce(String sourcePath, boolean hasDependencies) throws MalformedURLException, RulesInstantiationException, ProjectResolvingException, ClassNotFoundException { URL[] urls = toURLs(classpath); ClassLoader classLoader = null; try { classLoader = new URLClassLoader(urls, SimpleProjectEngineFactory.class.getClassLoader()); SimpleProjectEngineFactory.SimpleProjectEngineFactoryBuilder<?> builder = new SimpleProjectEngineFactory.SimpleProjectEngineFactoryBuilder<Object>(); if (hasDependencies) { builder.setWorkspace(workspaceFolder.getPath()); } SimpleProjectEngineFactory<?> factory = builder.setProject(sourcePath) .setClassLoader(classLoader) .setExecutionMode(true) .setExternalParameters(externalParameters) .build(); CompiledOpenClass openLRules; try { TestMethodNodeBinder.keepTestsInExecutionMode(); openLRules = factory.getCompiledOpenClass(); } finally { TestMethodNodeBinder.removeTestsInExecutionMode(); } return executeTests(openLRules); } finally { OpenClassUtil.releaseClassLoader(classLoader); } }
TestMethodBoundNode testMethodBoundNode = (TestMethodBoundNode) makeNode(tableSyntaxNode, module, bindingContext); TestSuiteMethod testSuite = new TestSuiteMethod(testedMethod, header, testMethodBoundNode); bindingContext.pushErrors(); bindingContext.pushMessages(); ITable dataTable = makeTable(module, tableSyntaxNode, tableName,
CompiledOpenClass openLRules; try { TestMethodNodeBinder.keepTestsInExecutionMode(); openLRules = factory.getCompiledOpenClass(); } finally { TestMethodNodeBinder.removeTestsInExecutionMode();