Package org.apache.shindig.social.core.util

Examples of org.apache.shindig.social.core.util.NullPropertyFilter.apply()


   * perform the test
   */
  @Test
  public void testApply() {
    PropertyFilter pf = new NullPropertyFilter();
    Assert.assertTrue(pf.apply(null, null, null));
    JSONArray jsa = new JSONArray();
    Assert.assertTrue(pf.apply(null, null, jsa));
    jsa.add("element");
    Assert.assertFalse(pf.apply(null, null, jsa));
    Assert.assertTrue(pf.apply(null, null, Lists.newArrayList()));
View Full Code Here


  @Test
  public void testApply() {
    PropertyFilter pf = new NullPropertyFilter();
    Assert.assertTrue(pf.apply(null, null, null));
    JSONArray jsa = new JSONArray();
    Assert.assertTrue(pf.apply(null, null, jsa));
    jsa.add("element");
    Assert.assertFalse(pf.apply(null, null, jsa));
    Assert.assertTrue(pf.apply(null, null, Lists.newArrayList()));
    Assert.assertFalse(pf.apply(null, null, Lists.newArrayList("element", "element")));
    Assert.assertTrue(pf.apply(null, null, new Object[] {}));
View Full Code Here

    PropertyFilter pf = new NullPropertyFilter();
    Assert.assertTrue(pf.apply(null, null, null));
    JSONArray jsa = new JSONArray();
    Assert.assertTrue(pf.apply(null, null, jsa));
    jsa.add("element");
    Assert.assertFalse(pf.apply(null, null, jsa));
    Assert.assertTrue(pf.apply(null, null, Lists.newArrayList()));
    Assert.assertFalse(pf.apply(null, null, Lists.newArrayList("element", "element")));
    Assert.assertTrue(pf.apply(null, null, new Object[] {}));
    Assert.assertFalse(pf.apply(null, null, new Object[] { "element" }));
  }
View Full Code Here

    Assert.assertTrue(pf.apply(null, null, null));
    JSONArray jsa = new JSONArray();
    Assert.assertTrue(pf.apply(null, null, jsa));
    jsa.add("element");
    Assert.assertFalse(pf.apply(null, null, jsa));
    Assert.assertTrue(pf.apply(null, null, Lists.newArrayList()));
    Assert.assertFalse(pf.apply(null, null, Lists.newArrayList("element", "element")));
    Assert.assertTrue(pf.apply(null, null, new Object[] {}));
    Assert.assertFalse(pf.apply(null, null, new Object[] { "element" }));
  }
}
View Full Code Here

    JSONArray jsa = new JSONArray();
    Assert.assertTrue(pf.apply(null, null, jsa));
    jsa.add("element");
    Assert.assertFalse(pf.apply(null, null, jsa));
    Assert.assertTrue(pf.apply(null, null, Lists.newArrayList()));
    Assert.assertFalse(pf.apply(null, null, Lists.newArrayList("element", "element")));
    Assert.assertTrue(pf.apply(null, null, new Object[] {}));
    Assert.assertFalse(pf.apply(null, null, new Object[] { "element" }));
  }
}
View Full Code Here

    Assert.assertTrue(pf.apply(null, null, jsa));
    jsa.add("element");
    Assert.assertFalse(pf.apply(null, null, jsa));
    Assert.assertTrue(pf.apply(null, null, Lists.newArrayList()));
    Assert.assertFalse(pf.apply(null, null, Lists.newArrayList("element", "element")));
    Assert.assertTrue(pf.apply(null, null, new Object[] {}));
    Assert.assertFalse(pf.apply(null, null, new Object[] { "element" }));
  }
}
View Full Code Here

    jsa.add("element");
    Assert.assertFalse(pf.apply(null, null, jsa));
    Assert.assertTrue(pf.apply(null, null, Lists.newArrayList()));
    Assert.assertFalse(pf.apply(null, null, Lists.newArrayList("element", "element")));
    Assert.assertTrue(pf.apply(null, null, new Object[] {}));
    Assert.assertFalse(pf.apply(null, null, new Object[] { "element" }));
  }
}
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.