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

Examples of org.apache.hadoop.fs.shell.find.Type.apply()


    type.initialise(new FindOptions());
   
    when(mockFstat.isDirectory()).thenReturn(true);
    PathData item = new PathData("/one/two/test", conf);

    assertEquals(Result.PASS, type.apply(item));
  }

  @Test
  public void testIsNotDirectory() throws IOException{
    Type type = new Type();
View Full Code Here


    type.initialise(new FindOptions());
   
    when(mockFstat.isDirectory()).thenReturn(false);
    PathData item = new PathData("/one/two/test", conf);

    assertEquals(Result.FAIL, type.apply(item));
  }

  @Test
  public void testIsSymlink() throws IOException{
    Type type = new Type();
View Full Code Here

    type.initialise(new FindOptions());
   
    when(mockFstat.isSymlink()).thenReturn(true);
    PathData item = new PathData("/one/two/test", conf);

    assertEquals(Result.PASS, type.apply(item));
  }

  @Test
  public void testIsNotSymlink() throws IOException{
    Type type = new Type();
View Full Code Here

    type.initialise(new FindOptions());
   
    when(mockFstat.isSymlink()).thenReturn(false);
    PathData item = new PathData("/one/two/test", conf);

    assertEquals(Result.FAIL, type.apply(item));
  }

  @Test
  public void testIsFile() throws IOException{
    Type type = new Type();
View Full Code Here

    type.initialise(new FindOptions());
   
    when(mockFstat.isFile()).thenReturn(true);
    PathData item = new PathData("/one/two/test", conf);

    assertEquals(Result.PASS, type.apply(item));
  }

  @Test
  public void testIsNotFile() throws IOException{
    Type type = new Type();
View Full Code Here

    type.initialise(new FindOptions());
   
    when(mockFstat.isFile()).thenReturn(false);
    PathData item = new PathData("/one/two/test", conf);

    assertEquals(Result.FAIL, type.apply(item));
  }

  @Test
  public void testInvalidType() throws IOException {
    Type type = new Type();
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.