Search in sources :

Example 31 with PathData

use of org.apache.hadoop.fs.shell.PathData in project hadoop by apache.

the class TestIname method applyMixedCase.

// test a matching name (different case)
@Test
public void applyMixedCase() throws IOException {
    setup("name");
    PathData item = new PathData("/directory/path/NaMe", mockFs.getConf());
    assertEquals(Result.PASS, name.apply(item, -1));
}
Also used : PathData(org.apache.hadoop.fs.shell.PathData) Test(org.junit.Test)

Example 32 with PathData

use of org.apache.hadoop.fs.shell.PathData in project hadoop by apache.

the class TestIname method applyMatch.

// test a matching name (same case)
@Test
public void applyMatch() throws IOException {
    setup("name");
    PathData item = new PathData("/directory/path/name", mockFs.getConf());
    assertEquals(Result.PASS, name.apply(item, -1));
}
Also used : PathData(org.apache.hadoop.fs.shell.PathData) Test(org.junit.Test)

Aggregations

PathData (org.apache.hadoop.fs.shell.PathData)32 Test (org.junit.Test)31 PrintStream (java.io.PrintStream)11 BaseExpression (org.apache.hadoop.fs.shell.find.BaseExpression)9 Expression (org.apache.hadoop.fs.shell.find.Expression)9 Find (org.apache.hadoop.fs.shell.find.Find)9 InOrder (org.mockito.InOrder)9 LinkedList (java.util.LinkedList)7 FileStatus (org.apache.hadoop.fs.FileStatus)1 Path (org.apache.hadoop.fs.Path)1