Beispiel #1
0
 public void copyDataFile(String testFile) throws IOException {
   try {
     IOUtil.copy(testFile, TEST_FOLDER_NAME + "/test.xml");
   } catch (IOException ex) {
     throw new IOException("Failed to copy TestFile '" + testFile + "': " + ex.getMessage());
   }
 }
Beispiel #2
0
 public RaplaTestCase(String name) {
   super(name);
   try {
     new File("temp").mkdir();
     File testFolder = new File(TEST_FOLDER_NAME);
     System.setProperty("jetty.home", testFolder.getPath());
     testFolder.mkdir();
     IOUtil.copy(TEST_SRC_FOLDER_NAME + "/test.xconf", TEST_FOLDER_NAME + "/test.xconf");
     // IOUtil.copy( "test-src/test.xlog", TEST_FOLDER_NAME + "/test.xlog" );
   } catch (IOException ex) {
     throw new RuntimeException("Can't initialize config-files: " + ex.getMessage());
   }
   try {
     Class<?> forName =
         RaplaTestCase.class.getClassLoader().loadClass("org.slf4j.bridge.SLF4JBridgeHandler");
     forName
         .getMethod("removeHandlersForRootLogger", new Class[] {})
         .invoke(null, new Object[] {});
     forName.getMethod("install", new Class[] {}).invoke(null, new Object[] {});
   } catch (Exception ex) {
     getLogger().warn("Can't install logging bridge  " + ex.getMessage());
     // Todo bootstrap log
   }
 }