@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()); }
@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()); }
@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()); }
@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()); }
@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()); }