Package ch.qos.logback.core.rolling.helper

Examples of ch.qos.logback.core.rolling.helper.RenameUtil


    randomOutputDir.mkdirs();
  }

  @Test
  public void renameToNonExistingDirectory() throws IOException, RolloverFailure {
    RenameUtil renameUtil = new RenameUtil();
    renameUtil.setContext(context);

    int diff2 = RandomUtil.getPositiveInt();
    File fromFile = File.createTempFile("from" + diff, "test",
            randomOutputDir);

    String randomTARGETDir = CoreTestConstants.OUTPUT_DIR_PREFIX + diff2;

    renameUtil.rename(fromFile.toString(), new File(randomTARGETDir + "/to.test").toString());
    StatusPrinter.printInCaseOfErrorsOrWarnings(context);
    assertTrue(statusChecker.isErrorFree(0));
  }
View Full Code Here



  @Test
  @Ignore
  public void MANUAL_renamingOnDifferentVolumesOnLinux() throws IOException, RolloverFailure {
    RenameUtil renameUtil = new RenameUtil();
    renameUtil.setContext(context);

    String src = "/tmp/ramdisk/foo.txt";
    FileOutputStream fis = new FileOutputStream(src);
    fis.write(("hello" + diff).getBytes());

    renameUtil.rename(src, "/tmp/foo" + diff + ".txt");
    StatusPrinter.print(context);
  }
View Full Code Here


  @Test
  @Ignore
  public void MANUAL_renamingOnDifferentVolumesOnWindows() throws IOException, RolloverFailure {
    RenameUtil renameUtil = new RenameUtil();
    renameUtil.setContext(context);

    String src = "c:/tmp/foo.txt";
    FileOutputStream fis = new FileOutputStream(src);
    fis.write(("hello" + diff).getBytes());
    fis.close();

    renameUtil.rename(src, "d:/tmp/foo" + diff + ".txt");
    StatusPrinter.print(context);
    assertTrue(statusChecker.isErrorFree(0));
  }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.rolling.helper.RenameUtil

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.