use of org.apache.tapestry5.services.EditBlockContribution in project tapestry-5 by apache.
the class BeanBlockSourceImplTest method found_edit_block.
@Test
public void found_edit_block() {
Block block = mockBlock();
RequestPageCache cache = mockRequestPageCache();
Page page = mockPage();
BeanBlockContribution contribution = new EditBlockContribution("mydata", "MyPage", "mydisplay");
Collection<BeanBlockContribution> configuration = newList(contribution);
train_get(cache, "MyPage", page);
train_getBlock(page, "mydisplay", block);
replay();
BeanBlockSource source = new BeanBlockSourceImpl(cache, createBeanBlockOverrideSource(cache), configuration);
// Check case insensitivity while we are at it.
Block actual = source.getEditBlock("MyData");
assertSame(actual, block);
verify();
}
Aggregations