Search in sources :

Example 31 with ViewConfigNode

use of org.apache.deltaspike.core.spi.config.view.ViewConfigNode in project deltaspike by apache.

the class ViewConfigTest method testMetaDataTreeCustomViewConfigPreProcessor.

@Test
public void testMetaDataTreeCustomViewConfigPreProcessor() {
    this.viewConfigExtension.addPageDefinition(Pages.Public.Index.class);
    ViewConfigNode node = this.viewConfigExtension.findNode(Pages.Public.Index.class);
    Assert.assertNotNull(node);
    Assert.assertNotNull(node.getParent());
    Assert.assertNotNull(node.getParent().getParent());
    Assert.assertNotNull(node.getParent().getParent().getParent());
    Assert.assertNull(node.getParent().getParent().getParent().getParent());
    Assert.assertNotNull(node.getMetaData());
    Assert.assertEquals(1, node.getMetaData().size());
    Assert.assertEquals(View.class, node.getMetaData().iterator().next().annotationType());
    Assert.assertEquals(View.ViewParameterMode.INCLUDE, ((View) node.getMetaData().iterator().next()).viewParams());
}
Also used : ViewConfigNode(org.apache.deltaspike.core.spi.config.view.ViewConfigNode)

Aggregations

ViewConfigNode (org.apache.deltaspike.core.spi.config.view.ViewConfigNode)31 Test (org.junit.Test)24 Annotation (java.lang.annotation.Annotation)7 ArrayList (java.util.ArrayList)4 HashSet (java.util.HashSet)4 Set (java.util.Set)3 CopyOnWriteArraySet (java.util.concurrent.CopyOnWriteArraySet)2 ViewConfig (org.apache.deltaspike.core.api.config.view.ViewConfig)2 View (org.apache.deltaspike.jsf.api.config.view.View)2 ApplicationScoped (javax.enterprise.context.ApplicationScoped)1 CallbackDescriptor (org.apache.deltaspike.core.api.config.view.metadata.CallbackDescriptor)1 InlineViewMetaData (org.apache.deltaspike.core.api.config.view.metadata.InlineViewMetaData)1 ViewConfigDescriptor (org.apache.deltaspike.core.api.config.view.metadata.ViewConfigDescriptor)1 ViewConfigResolver (org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver)1 InlineMetaDataTransformer (org.apache.deltaspike.core.spi.config.view.InlineMetaDataTransformer)1 TargetViewConfigProvider (org.apache.deltaspike.core.spi.config.view.TargetViewConfigProvider)1