@Test public void processPathNoQuotasHuman() throws Exception { Path path = new Path("mockfs:/test"); when(mockFs.getFileStatus(eq(path))).thenReturn(fileStat); PathData pathData = new PathData(path.toString(), conf); PrintStream out = mock(PrintStream.class); Count count = new Count(); count.out = out; LinkedList<String> options = new LinkedList<String>(); options.add("-h"); options.add("dummy"); count.processOptions(options); count.processPath(pathData); verify(out).println(HUMAN + NO_QUOTAS + path.toString()); }
@Test public void processPathShowQuotas() throws Exception { Path path = new Path("mockfs:/test"); when(mockFs.getFileStatus(eq(path))).thenReturn(fileStat); PathData pathData = new PathData(path.toString(), conf); PrintStream out = mock(PrintStream.class); Count count = new Count(); count.out = out; LinkedList<String> options = new LinkedList<String>(); options.add("-q"); options.add("dummy"); count.processOptions(options); count.processPath(pathData); verify(out).println(BYTES + WITH_QUOTAS + path.toString()); verifyNoMoreInteractions(out); }
@Test public void processPathShowQuotasHuman() throws Exception { Path path = new Path("mockfs:/test"); when(mockFs.getFileStatus(eq(path))).thenReturn(fileStat); PathData pathData = new PathData(path.toString(), conf); PrintStream out = mock(PrintStream.class); Count count = new Count(); count.out = out; LinkedList<String> options = new LinkedList<String>(); options.add("-q"); options.add("-h"); options.add("dummy"); count.processOptions(options); count.processPath(pathData); verify(out).println(HUMAN + WITH_QUOTAS + path.toString()); }
@Test public void processPathShowQuotasHuman() throws Exception { Path path = new Path("mockfs:/test"); when(mockFs.getFileStatus(eq(path))).thenReturn(fileStat); PathData pathData = new PathData(path.toString(), conf); PrintStream out = mock(PrintStream.class); Count count = new Count(); count.out = out; LinkedList<String> options = new LinkedList<String>(); options.add("-q"); options.add("-h"); options.add("dummy"); count.processOptions(options); count.processPath(pathData); verify(out).println(HUMAN + WITH_QUOTAS + path.toString()); }
@Test public void processPathNoQuotas() throws Exception { Path path = new Path("mockfs:/test"); when(mockFs.getFileStatus(eq(path))).thenReturn(fileStat); PathData pathData = new PathData(path.toString(), conf); PrintStream out = mock(PrintStream.class); Count count = new Count(); count.out = out; LinkedList<String> options = new LinkedList<String>(); options.add("dummy"); count.processOptions(options); count.processPath(pathData); verify(out).println(BYTES + NO_QUOTAS + path.toString()); verifyNoMoreInteractions(out); }
@Test public void processPathNoQuotasHuman() throws Exception { Path path = new Path("mockfs:/test"); when(mockFs.getFileStatus(eq(path))).thenReturn(fileStat); PathData pathData = new PathData(path.toString(), conf); PrintStream out = mock(PrintStream.class); Count count = new Count(); count.out = out; LinkedList<String> options = new LinkedList<String>(); options.add("-h"); options.add("dummy"); count.processOptions(options); count.processPath(pathData); verify(out).println(HUMAN + NO_QUOTAS + path.toString()); }
@Test public void processPathNoQuotas() throws Exception { Path path = new Path("mockfs:/test"); when(mockFs.getFileStatus(eq(path))).thenReturn(fileStat); PathData pathData = new PathData(path.toString(), conf); PrintStream out = mock(PrintStream.class); Count count = new Count(); count.out = out; LinkedList<String> options = new LinkedList<String>(); options.add("dummy"); count.processOptions(options); count.processPath(pathData); verify(out).println(BYTES + NO_QUOTAS + path.toString()); verifyNoMoreInteractions(out); }
@Test public void processPathShowQuotas() throws Exception { Path path = new Path("mockfs:/test"); when(mockFs.getFileStatus(eq(path))).thenReturn(fileStat); PathData pathData = new PathData(path.toString(), conf); PrintStream out = mock(PrintStream.class); Count count = new Count(); count.out = out; LinkedList<String> options = new LinkedList<String>(); options.add("-q"); options.add("dummy"); count.processOptions(options); count.processPath(pathData); verify(out).println(BYTES + WITH_QUOTAS + path.toString()); verifyNoMoreInteractions(out); }