public File write(String path, String fileName, String text) throws IOException { File f = newFile( path, fileName ); write( f, text ); return f; }
public File write(String fileName, String text) throws IOException { File f = newFile( fileName ); write( f, text ); return f; }
public File write(String fileName, String text) throws IOException { File f = newFile( fileName ); write( f, text ); return f; }
public File write(String path, String fileName, String text) throws IOException { File f = newFile( path, fileName ); write( f, text ); return f; }
public void writeFs(String outFilename, MemoryFileSystem mfs) { java.io.File file = fileManager.newFile( outFilename ); file.mkdir(); writeFs(mfs, mfs.getRootFolder(), file); }
protected File createKPom(ReleaseId releaseId) throws IOException { File pomFile = fileManager.newFile("pom.xml"); fileManager.write(pomFile, getPom(releaseId)); return pomFile; }
protected File createKPom(ReleaseId releaseId) throws IOException { File pomFile = fileManager.newFile("pom.xml"); fileManager.write(pomFile, getPom(releaseId)); return pomFile; }
protected File createKPom(ReleaseId releaseId) throws IOException { File pomFile = fileManager.newFile("pom.xml"); fileManager.write(pomFile, getPom(releaseId)); return pomFile; }
@Test public void testParsePomPropertiesFromJarDir() throws Exception { createKieModule(MODULE_JARDIR_NAME, false, MODULE_JARDIR_VERSION); final File kModuleDir = getFileManager().newFile(MODULE_JARDIR_NAME + "-" + MODULE_JARDIR_VERSION); Assertions.assertThat(kModuleDir).isNotNull(); Assertions.assertThat(kModuleDir).isDirectory(); kModuleDir.renameTo(new File(kModuleDir.getAbsolutePath() + ".jar")); final File kModuleFile = getFileManager().newFile(MODULE_JARDIR_NAME + "-" + MODULE_JARDIR_VERSION + ".jar"); final String pomProperties = ClasspathKieProject.getPomProperties(kModuleFile.getAbsolutePath()); checkPomProperties(pomProperties, MODULE_JARDIR_NAME, MODULE_JARDIR_VERSION); }
@Test public void testParsePomPropertiesFromJarFile() throws Exception { createKieModule(MODULE_JARFILE_NAME, true, MODULE_JARFILE_VERSION); final File kModuleFile = getFileManager().newFile(MODULE_JARFILE_NAME + "-" + MODULE_JARFILE_VERSION + ".jar"); final String pomProperties = ClasspathKieProject.getPomProperties( kModuleFile.getAbsolutePath() ); checkPomProperties(pomProperties, MODULE_JARFILE_NAME, MODULE_JARFILE_VERSION); }
@BeforeClass public static void beforeClass() { helper = new AbstractKnowledgeTest(); try { helper.setUp(); } catch ( Exception e ) { e.printStackTrace(); fail( e.getMessage() ); } try { helper.createKieModule( "jar1", true, "1.0" ); helper.createKieModule( "jar2", true, "2.0" ); } catch ( Exception e ) { e.printStackTrace(); fail( "Unable to build dynamic KieModules:\n" + e.toString() ); } CDITestRunner.setUp( helper.getFileManager().newFile( "jar2-2.0.jar" ) ); CDITestRunner.weld = CDITestRunner.createWeld( StatelessKieSessionDefaultInjectionTest.class.getName() ); CDITestRunner.container = CDITestRunner.weld.initialize(); }
@BeforeClass public static void beforeClass() { helper = new AbstractKnowledgeTest(); try { helper.setUp(); } catch ( Exception e ) { e.printStackTrace(); fail( e.getMessage() ); } try { helper.createKieModule( "jar1", true, "1.0" ); helper.createKieModule( "jar2", true, "2.0" ); } catch ( Exception e ) { e.printStackTrace(); fail( "Unable to build dynamic KieModules:\n" + e.toString() ); } CDITestRunner.setUp( helper.getFileManager().newFile( "jar2-2.0.jar" ) ); CDITestRunner.weld = CDITestRunner.createWeld( KieBaseDefaultInjectionTest.class.getName() ); CDITestRunner.container = CDITestRunner.weld.initialize(); }
@BeforeClass public static void beforeClass() { helper = new AbstractKnowledgeTest(); try { helper.setUp(); } catch ( Exception e ) { e.printStackTrace(); fail( e.getMessage() ); } try { helper.createKieModule( "jar1", true, "1.0" ); helper.createKieModule( "jar2", true, "2.0" ); } catch ( Exception e ) { e.printStackTrace(); fail( "Unable to build dynamic KieModules:\n" + e.toString() ); } CDITestRunner.setUp( helper.getFileManager().newFile( "jar2-2.0.jar" ) ); CDITestRunner.weld = CDITestRunner.createWeld( KieSessionDefaultInjectionTest.class.getName() ); CDITestRunner.container = CDITestRunner.weld.initialize(); }
@BeforeClass public static void beforeClass() { helper = new AbstractKnowledgeTest(); try { helper.setUp(); } catch ( Exception e ) { e.printStackTrace(); fail( e.getMessage() ); } try { helper.createKieModule( "jar1", true, "1.0" ); helper.createKieModule( "jar1", true, "1.1" ); helper.createKieModule( "jar2", true, "2.0" ); } catch ( Exception e ) { e.printStackTrace(); fail( "Unable to build dynamic KieModules:\n" + e.toString() ); } CDITestRunner.setUp( helper.getFileManager().newFile( "jar2-2.0.jar" ) ); CDITestRunner.weld = CDITestRunner.createWeld( KieContainerInjectionTest.class.getName() ); CDITestRunner.container = CDITestRunner.weld.initialize(); }
trgMfs.writeAsJar(fileManager.getRootDirectory(), namespace + "-" + version); } else { java.io.File file = fileManager.newFile( namespace + "-" + version ); trgMfs.writeAsFs( file );