Package com.google.enterprise.connector.spi

Examples of com.google.enterprise.connector.spi.SimpleProperty.nextValue()


  public void testSingleValue() throws Exception {
    Value expected = Value.getStringValue("test1");
    SimpleProperty property = new SimpleProperty(expected);

    // We should get our value back, but only once.
    Value value = property.nextValue();
    assertNotNull(value);
    assertEquals(expected, value);

    // Next fetch should yield null.
    value = property.nextValue();
View Full Code Here


    Value value = property.nextValue();
    assertNotNull(value);
    assertEquals(expected, value);

    // Next fetch should yield null.
    value = property.nextValue();
    assertNull(value);

    // In fact, all subsequent fetches should yield null.
    for (int i = 0; i < 10; i++) {
      assertNull(property.nextValue());
View Full Code Here

    value = property.nextValue();
    assertNull(value);

    // In fact, all subsequent fetches should yield null.
    for (int i = 0; i < 10; i++) {
      assertNull(property.nextValue());
    }
  }

  public void testMultiValues() throws Exception {
    LinkedList<Value> list = new LinkedList<Value>();
View Full Code Here

  private void checkMultiValues(List<Value> list) throws Exception {
    SimpleProperty property = new SimpleProperty(list);

    // We should get our values back, in order.
    for (Value expected : list) {
      Value value = property.nextValue();
      assertNotNull(value);
      assertEquals(expected, value);
    }

    // All subsequent fetches should yield null.
View Full Code Here

      assertEquals(expected, value);
    }

    // All subsequent fetches should yield null.
    for (int i = 0; i < 10; i++) {
      assertNull(property.nextValue());
    }
  }
}
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.