Examples of FindOptions


Examples of com.aspose.cells.FindOptions

   
    //Finding the cell containing the specified formula
    Cells cells = worksheet.getCells();
   
    //Instantiate FindOptions
    FindOptions findOptions = new FindOptions();
   
    //Finding the cell containing a string value that starts with "Or"
    findOptions.setLookAtType(LookAtType.START_WITH);
   
    Cell cell = cells.find("SH",null,findOptions);
   
    //Printing the name of the cell found after searching worksheet
    System.out.println("Name of the cell containing String: " + cell.getName());
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.FindOptions

  @Test
  public void applyEquals() throws IOException {
    Replicas rep = new Replicas();
    addArgument(rep, "3");
    rep.initialise(new FindOptions());

    assertEquals(Result.FAIL, rep.apply(one));
    assertEquals(Result.FAIL, rep.apply(two));
    assertEquals(Result.PASS, rep.apply(three));
    assertEquals(Result.FAIL, rep.apply(four));
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.FindOptions

  @Test
  public void applyGreaterThan() throws IOException {
    Replicas rep = new Replicas();
    addArgument(rep, "+3");
    rep.initialise(new FindOptions());

    assertEquals(Result.FAIL, rep.apply(one));
    assertEquals(Result.FAIL, rep.apply(two));
    assertEquals(Result.FAIL, rep.apply(three));
    assertEquals(Result.PASS, rep.apply(four));
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.FindOptions

  @Test
  public void applyLessThan() throws IOException {
    Replicas rep = new Replicas();
    addArgument(rep, "-3");
    rep.initialise(new FindOptions());

    assertEquals(Result.PASS, rep.apply(one));
    assertEquals(Result.PASS, rep.apply(two));
    assertEquals(Result.FAIL, rep.apply(three));
    assertEquals(Result.FAIL, rep.apply(four));
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.FindOptions

    assertEquals(expr, test.expression);
  }

  @Test
  public void initialise() throws IOException {
    FindOptions options = mock(FindOptions.class);
    test.initialise(options);
    verify(expr).initialise(options);
    verifyNoMoreInteractions(expr);
  }
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.FindOptions

  @Test
  public void testExact() throws IOException {
    Mtime.Mmin mmin = new Mtime.Mmin();
    addArgument(mmin, "5");
   
    FindOptions options = new FindOptions();
    options.setStartTime(NOW);
    mmin.initialise(options);
   
    assertEquals(Result.FAIL, mmin.apply(fourDays));
    assertEquals(Result.FAIL, mmin.apply(fiveDaysMinus));
    assertEquals(Result.PASS, mmin.apply(fiveDays));
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.FindOptions

  @Test
  public void testGreater() throws IOException {
    Mtime.Mmin mmin = new Mtime.Mmin();
    addArgument(mmin, "+5");

    FindOptions options = new FindOptions();
    options.setStartTime(NOW);
    mmin.initialise(options);
    assertEquals(Result.FAIL, mmin.apply(fourDays));
    assertEquals(Result.FAIL, mmin.apply(fiveDaysMinus));
    assertEquals(Result.FAIL, mmin.apply(fiveDays));
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.FindOptions

  @Test
  public void testLess() throws IOException {
    Mtime.Mmin mmin = new Mtime.Mmin();
    addArgument(mmin, "-5");
   
    FindOptions options = new FindOptions();
    options.setStartTime(NOW);
    mmin.initialise(options);
    assertEquals(Result.PASS, mmin.apply(fourDays));
    assertEquals(Result.PASS, mmin.apply(fiveDaysMinus));
    assertEquals(Result.FAIL, mmin.apply(fiveDays));
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.FindOptions

  @Test
  public void testIsDirectory() throws IOException{
    Type type = new Type();
    addArgument(type, "d");
    type.initialise(new FindOptions());
   
    when(mockFstat.isDirectory()).thenReturn(true);
    PathData item = new PathData("/one/two/test", conf);

    assertEquals(Result.PASS, type.apply(item));
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.FindOptions

  @Test
  public void testIsNotDirectory() throws IOException{
    Type type = new Type();
    addArgument(type, "d");
    type.initialise(new FindOptions());
   
    when(mockFstat.isDirectory()).thenReturn(false);
    PathData item = new PathData("/one/two/test", conf);

    assertEquals(Result.FAIL, type.apply(item));
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.