Tabnine Logo
BeanFilterTest.assertEquals
Code IndexAdd Tabnine to your IDE (free)

How to use
assertEquals
method
in
org.apache.shindig.protocol.conversion.BeanFilterTest

Best Java code snippets using org.apache.shindig.protocol.conversion.BeanFilterTest.assertEquals (Showing top 20 results out of 315)

origin: org.apache.shindig/shindig-common

@Test
public void testProcessFields() {
 Set<String> srcFields = ImmutableSet.of("A", "b", "c.d.e.f", "Case", "cAse", "CASE");
 Set<String> newFields = beanFilter.processBeanFields(srcFields);
 assertEquals(7, newFields.size());
 assertTrue(newFields.contains("a"));
 assertTrue(newFields.contains("b"));
 assertTrue(newFields.contains("c"));
 assertTrue(newFields.contains("c.d"));
 assertTrue(newFields.contains("c.d.e"));
 assertTrue(newFields.contains("c.d.e.f"));
 assertTrue(newFields.contains("case"));
}
origin: org.gatein.shindig/shindig-common

@Test
public void testProcessFields() {
 Set<String> srcFields = ImmutableSet.of("A", "b", "c.d.e.f", "Case", "cAse", "CASE");
 Set<String> newFields = beanFilter.processBeanFields(srcFields);
 assertEquals(7, newFields.size());
 assertTrue(newFields.contains("a"));
 assertTrue(newFields.contains("b"));
 assertTrue(newFields.contains("c"));
 assertTrue(newFields.contains("c.d"));
 assertTrue(newFields.contains("c.d.e"));
 assertTrue(newFields.contains("c.d.e.f"));
 assertTrue(newFields.contains("case"));
}
origin: com.lmco.shindig/shindig-common

@Test
public void testProcessFields() {
 Set<String> srcFields = ImmutableSet.of("A", "b", "c.d.e.f", "Case", "cAse", "CASE");
 Set<String> newFields = beanFilter.processBeanFields(srcFields);
 assertEquals(7, newFields.size());
 assertTrue(newFields.contains("a"));
 assertTrue(newFields.contains("b"));
 assertTrue(newFields.contains("c"));
 assertTrue(newFields.contains("c.d"));
 assertTrue(newFields.contains("c.d.e"));
 assertTrue(newFields.contains("c.d.e.f"));
 assertTrue(newFields.contains("case"));
}
origin: apache/shindig

@Test
public void testProcessFields() {
 Set<String> srcFields = ImmutableSet.of("A", "b", "c.d.e.f", "Case", "cAse", "CASE");
 Set<String> newFields = beanFilter.processBeanFields(srcFields);
 assertEquals(7, newFields.size());
 assertTrue(newFields.contains("a"));
 assertTrue(newFields.contains("b"));
 assertTrue(newFields.contains("c"));
 assertTrue(newFields.contains("c.d"));
 assertTrue(newFields.contains("c.d.e"));
 assertTrue(newFields.contains("c.d.e.f"));
 assertTrue(newFields.contains("case"));
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testProcessFields() {
 Set<String> srcFields = ImmutableSet.of("A", "b", "c.d.e.f", "Case", "cAse", "CASE");
 Set<String> newFields = beanFilter.processBeanFields(srcFields);
 assertEquals(7, newFields.size());
 assertTrue(newFields.contains("a"));
 assertTrue(newFields.contains("b"));
 assertTrue(newFields.contains("c"));
 assertTrue(newFields.contains("c.d"));
 assertTrue(newFields.contains("c.d.e"));
 assertTrue(newFields.contains("c.d.e.f"));
 assertTrue(newFields.contains("case"));
}
origin: org.gatein.shindig/shindig-common

@Test
public void testInt() throws Exception {
 SimpleBean data = new SimpleBean().setI(5);
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("i"));
 assertEquals(5, newData.getI());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("s"));
 // Filter is ignored for primitive types:
 assertEquals(5, newData.getI());
}
origin: com.lmco.shindig/shindig-common

@Test
public void testInt() throws Exception {
 SimpleBean data = new SimpleBean().setI(5);
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("i"));
 assertEquals(5, newData.getI());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("s"));
 // Filter is ignored for primitive types:
 assertEquals(5, newData.getI());
}
origin: org.apache.shindig/shindig-common

@Test
public void testInt() throws Exception {
 SimpleBean data = new SimpleBean().setI(5);
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("i"));
 assertEquals(5, newData.getI());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("s"));
 // Filter is ignored for primitive types:
 assertEquals(5, newData.getI());
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testInt() throws Exception {
 SimpleBean data = new SimpleBean().setI(5);
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("i"));
 assertEquals(5, newData.getI());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("s"));
 // Filter is ignored for primitive types:
 assertEquals(5, newData.getI());
}
origin: apache/shindig

@Test
public void testInt() throws Exception {
 SimpleBean data = new SimpleBean().setI(5);
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("i"));
 assertEquals(5, newData.getI());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("s"));
 // Filter is ignored for primitive types:
 assertEquals(5, newData.getI());
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testList() throws Exception {
 SimpleBean data = new SimpleBean().setList(ImmutableList.<String>of("d1", "d2"));
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
  dataBean, ImmutableSet.<String>of("s"));
 assertEquals(null, newData.getList());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("list"));
 assertArrayEquals(data.getList().toArray(), newData.getList().toArray());
}
origin: org.apache.shindig/shindig-common

@Test
public void testList() throws Exception {
 SimpleBean data = new SimpleBean().setList(ImmutableList.<String>of("d1", "d2"));
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
  dataBean, ImmutableSet.<String>of("s"));
 assertEquals(null, newData.getList());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("list"));
 assertArrayEquals(data.getList().toArray(), newData.getList().toArray());
}
origin: org.gatein.shindig/shindig-common

@Test
public void testList() throws Exception {
 SimpleBean data = new SimpleBean().setList(ImmutableList.<String>of("d1", "d2"));
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
  dataBean, ImmutableSet.<String>of("s"));
 assertEquals(null, newData.getList());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("list"));
 assertArrayEquals(data.getList().toArray(), newData.getList().toArray());
}
origin: apache/shindig

@Test
public void testList() throws Exception {
 SimpleBean data = new SimpleBean().setList(ImmutableList.<String>of("d1", "d2"));
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
  dataBean, ImmutableSet.<String>of("s"));
 assertEquals(null, newData.getList());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("list"));
 assertArrayEquals(data.getList().toArray(), newData.getList().toArray());
}
origin: com.lmco.shindig/shindig-common

@Test
public void testList() throws Exception {
 SimpleBean data = new SimpleBean().setList(ImmutableList.<String>of("d1", "d2"));
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
  dataBean, ImmutableSet.<String>of("s"));
 assertEquals(null, newData.getList());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("list"));
 assertArrayEquals(data.getList().toArray(), newData.getList().toArray());
}
origin: org.gatein.shindig/shindig-common

@Test
public void testString() throws Exception {
 SimpleBean data = new SimpleBean().setS("data");
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("s"));
 assertEquals("data", newData.getS());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("i"));
 assertNull("S is filtered out", newData.getS());
 assertNotNull("Required field", newData.getRequired());
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testString() throws Exception {
 SimpleBean data = new SimpleBean().setS("data");
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("s"));
 assertEquals("data", newData.getS());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("i"));
 assertNull("S is filtered out", newData.getS());
 assertNotNull("Required field", newData.getRequired());
}
origin: com.lmco.shindig/shindig-common

@Test
public void testString() throws Exception {
 SimpleBean data = new SimpleBean().setS("data");
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("s"));
 assertEquals("data", newData.getS());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("i"));
 assertNull("S is filtered out", newData.getS());
 assertNotNull("Required field", newData.getRequired());
}
origin: apache/shindig

@Test
public void testString() throws Exception {
 SimpleBean data = new SimpleBean().setS("data");
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("s"));
 assertEquals("data", newData.getS());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("i"));
 assertNull("S is filtered out", newData.getS());
 assertNotNull("Required field", newData.getRequired());
}
origin: org.apache.shindig/shindig-common

@Test
public void testString() throws Exception {
 SimpleBean data = new SimpleBean().setS("data");
 SimpleBeanInterface dataBean = (SimpleBeanInterface) beanDelegator.createDelegator(data);
 SimpleBeanInterface newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("s"));
 assertEquals("data", newData.getS());
 newData = (SimpleBeanInterface) beanFilter.createFilteredBean(
   dataBean, ImmutableSet.<String>of("i"));
 assertNull("S is filtered out", newData.getS());
 assertNotNull("Required field", newData.getRequired());
}
org.apache.shindig.protocol.conversionBeanFilterTestassertEquals

Popular methods of BeanFilterTest

  • assertArrayEquals
  • assertFalse
  • assertNotNull
  • assertNotSame
  • assertNull
  • assertSame
  • assertTrue

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • putExtra (Intent)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • BoxLayout (javax.swing)
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now