Examples of Clean


Examples of com.alexecollins.vbox.core.task.Clean

* @phase clean
*/
public class CleanMojo extends AbstractVBoxesMojo {

  protected void execute(VBox box) throws Exception {
    new Clean(getWork(),box).call();
  }
View Full Code Here

Examples of com.alexecollins.vbox.core.task.Clean

  public void execute() throws BuildException {
    if (dir == null) {
      throw new BuildException("dir is null");
    }
    try {
      new Clean(work(), new VBox(context(), dir.toURI())).call();
    } catch (Exception e) {
      throw new BuildException(e);
    }
  }
View Full Code Here

Examples of com.m6d.filecrush.clean.Clean

    out2.close();
   
    assertEquals(true,fs.exists(cFile));
    assertEquals(true,fs.exists(oldFile));
   
    Clean cleanWarn = new Clean();
    Configuration warnConf = createJobConf();
    warnConf.set(Clean.TARGET_DIR, ROOT_DIR.toString());
    warnConf.set(Clean.TARGET_EXPR, "cfile");
    warnConf.set(Clean.WARN_MODE, "true");
    ToolRunner.run(warnConf, cleanWarn, new String[]{});
    assertEquals(true,fs.exists(cFile));
    assertEquals(true,fs.exists(oldFile));
       
    Clean cleanReg = new Clean();
    Configuration regConf = createJobConf();
    regConf.set(Clean.TARGET_DIR, ROOT_DIR.toString());
    regConf.set(Clean.TARGET_EXPR, "cfile");
    ToolRunner.run(regConf, cleanReg, new String[]{});
    assertEquals(false,fs.exists(cFile));
    assertEquals(true,fs.exists(oldFile));
   
    Clean clean = new Clean();
    Configuration cleanConf = createJobConf();
    cleanConf.setLong(Clean.CUTTOFF_MILLIS, 20000);
    cleanConf.set(Clean.TARGET_DIR, ROOT_DIR.toString());
    ToolRunner.run(cleanConf, clean, new String[]{});
    assertEquals(true,fs.exists(oldFile));
    Thread.sleep(3);
   
    Clean clean2 = new Clean();
    Configuration cleanConf2 = createJobConf();
    cleanConf2.setLong(Clean.CUTTOFF_MILLIS, 1);
    cleanConf2.set(Clean.TARGET_DIR, ROOT_DIR.toString());
    ToolRunner.run(cleanConf2, clean2, new String[]{});
    assertEquals(false,fs.exists(oldFile));
View Full Code Here

Examples of com.m6d.filecrush.clean.Clean

   
  }
 
  @Test
  public void testNegatives() throws Exception{
    Clean clean = new Clean();
    Configuration cleanConf = createJobConf();
    cleanConf.setLong(Clean.CUTTOFF_MILLIS, 20000);
    cleanConf.set(Clean.TARGET_DIR, ROOT_DIR.toString());
    cleanConf.set(Clean.TARGET_EXPR, "bla");
    int res = ToolRunner.run(cleanConf, clean, new String[]{});
View Full Code Here

Examples of com.m6d.filecrush.clean.Clean

    assertEquals(9,res);
  }

  @Test
  public void testRootClean() throws Exception{
    Clean clean = new Clean();
    Configuration cleanConf = createJobConf();
    cleanConf.set(Clean.TARGET_DIR, "/");
    cleanConf.set(Clean.TARGET_EXPR, "bla");
    int res = ToolRunner.run(cleanConf, clean, new String[]{});
    assertEquals(2,res);
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.