Package org.apache.hadoop.fs.shell.find

Examples of org.apache.hadoop.fs.shell.find.Size.initialise()


  @Test
  public void applyEqualsBlock() throws IOException {
    Size size = new Size();
    addArgument(size, "5");
    size.initialise(new FindOptions());

    assertEquals(Result.PASS, size.apply(fiveBlocks));
    assertEquals(Result.FAIL, size.apply(sixBlocks));
    assertEquals(Result.FAIL, size.apply(fourBlocks));
    assertEquals(Result.PASS, size.apply(fiveBlocksPlus));
View Full Code Here


  @Test
  public void applyGreaterThanBlock() throws IOException {
    Size size = new Size();
    addArgument(size, "+5");
    size.initialise(new FindOptions());

    assertEquals(Result.FAIL, size.apply(fiveBlocks));
    assertEquals(Result.PASS, size.apply(sixBlocks));
    assertEquals(Result.FAIL, size.apply(fourBlocks));
    assertEquals(Result.FAIL, size.apply(fiveBlocksPlus));
View Full Code Here

  @Test
  public void applyLessThanBlock() throws IOException {
    Size size = new Size();
    addArgument(size, "-5");
    size.initialise(new FindOptions());

    assertEquals(Result.FAIL, size.apply(fiveBlocks));
    assertEquals(Result.FAIL, size.apply(sixBlocks));
    assertEquals(Result.PASS, size.apply(fourBlocks));
    assertEquals(Result.FAIL, size.apply(fiveBlocksPlus));
View Full Code Here

  }
  @Test
  public void applyEqualsBytes() throws IOException {
    Size size = new Size();
    addArgument(size, (5 * 512) + "c");
    size.initialise(new FindOptions());

    assertEquals(Result.PASS, size.apply(fiveBlocks));
    assertEquals(Result.FAIL, size.apply(sixBlocks));
    assertEquals(Result.FAIL, size.apply(fourBlocks));
    assertEquals(Result.FAIL, size.apply(fiveBlocksPlus));
View Full Code Here

  @Test
  public void applyGreaterThanBytes() throws IOException {
    Size size = new Size();
    addArgument(size, "+" + (5 * 512) + "c");
    size.initialise(new FindOptions());

    assertEquals(Result.FAIL, size.apply(fiveBlocks));
    assertEquals(Result.PASS, size.apply(sixBlocks));
    assertEquals(Result.FAIL, size.apply(fourBlocks));
    assertEquals(Result.PASS, size.apply(fiveBlocksPlus));
View Full Code Here

  @Test
  public void applyLessThanBytes() throws IOException {
    Size size = new Size();
    addArgument(size, "-" + (5 * 512) + "c");
    size.initialise(new FindOptions());

    assertEquals(Result.FAIL, size.apply(fiveBlocks));
    assertEquals(Result.FAIL, size.apply(sixBlocks));
    assertEquals(Result.PASS, size.apply(fourBlocks));
    assertEquals(Result.FAIL, size.apply(fiveBlocksPlus));
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.