Package org.apache.accumulo.core.conf.AccumuloConfiguration

Examples of org.apache.accumulo.core.conf.AccumuloConfiguration.PropertyFilter


  @Test
  public void testGetProperties_ParentFilter() {
    Map<String,String> props = new java.util.HashMap<String,String>();
    AccumuloConfiguration parent = createMock(AccumuloConfiguration.class);
    PropertyFilter filter = createMock(PropertyFilter.class);
    PropertyFilter parentFilter = createMock(PropertyFilter.class);
    parent.getProperties(props, parentFilter);
    replay(parent);
    expect(zc.getChildren(PATH)).andReturn(null);
    replay(zc);
View Full Code Here


    assertEquals("sekrit", c.get(Property.INSTANCE_SECRET));
  }

  @Test
  public void testGetProperties() {
    PropertyFilter filter = new AllFilter();
    Map<String,String> props = new java.util.HashMap<String,String>();
    parent.getProperties(props, filter);
    replay(parent);
    List<String> children = new java.util.ArrayList<String>();
    children.add("foo");
View Full Code Here

    assertNull(c.get(Property.INSTANCE_SECRET));
  }

  @Test
  public void testGetProperties() {
    PropertyFilter filter = new AllFilter();
    Map<String,String> props = new java.util.HashMap<String,String>();
    parent.getProperties(props, filter);
    replay(parent);
    List<String> children = new java.util.ArrayList<String>();
    children.add("foo");
View Full Code Here

  @Test
  public void testGetProperties() {
    Map<String,String> props = new java.util.HashMap<String,String>();
    AccumuloConfiguration parent = createMock(AccumuloConfiguration.class);
    PropertyFilter filter = createMock(PropertyFilter.class);
    parent.getProperties(props, filter);
    replay(parent);
    String child1 = "child1";
    String child2 = "child2";
    List<String> children = new java.util.ArrayList<String>();
    children.add(child1);
    children.add(child2);
    expect(zc.getChildren(PATH)).andReturn(children);
    expect(zc.get(PATH + "/" + child1)).andReturn(VALUE_BYTES);
    expect(zc.get(PATH + "/" + child2)).andReturn(null);
    replay(zc);
    expect(filter.accept(child1)).andReturn(true);
    expect(filter.accept(child2)).andReturn(true);
    replay(filter);

    a.getProperties(props, PATH, filter, parent, null);
    assertEquals(1, props.size());
    assertEquals(VALUE, props.get(child1));
View Full Code Here

  @Test
  public void testGetProperties_NoChildren() {
    Map<String,String> props = new java.util.HashMap<String,String>();
    AccumuloConfiguration parent = createMock(AccumuloConfiguration.class);
    PropertyFilter filter = createMock(PropertyFilter.class);
    parent.getProperties(props, filter);
    replay(parent);
    expect(zc.getChildren(PATH)).andReturn(null);
    replay(zc);
View Full Code Here

  @Test
  public void testGetProperties_Filter() {
    Map<String,String> props = new java.util.HashMap<String,String>();
    AccumuloConfiguration parent = createMock(AccumuloConfiguration.class);
    PropertyFilter filter = createMock(PropertyFilter.class);
    parent.getProperties(props, filter);
    replay(parent);
    String child1 = "child1";
    List<String> children = new java.util.ArrayList<String>();
    children.add(child1);
    expect(zc.getChildren(PATH)).andReturn(children);
    replay(zc);
    expect(filter.accept(child1)).andReturn(false);
    replay(filter);

    a.getProperties(props, PATH, filter, parent, null);
    assertEquals(0, props.size());
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.conf.AccumuloConfiguration.PropertyFilter

Copyright © 2018 www.massapicom. 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.