*
* @hierarchy Aura.Runtime.Service
* @userStory AuraServlet: POST
*/
public void testGetComponentDef() throws Exception {
ComponentDef component = Aura.getDefinitionService().getDefinition("auratest:testComponent1",
ComponentDef.class);
Map<String, RegisterEventDef> red = component.getRegisterEventDefs();
assertEquals(1, red.size());
assertNotNull(red.get("testEvent"));
Collection<EventHandlerDef> ehd = component.getHandlerDefs();
assertEquals(0, ehd.size());
// assertEquals("testEvent",ehd.iterator().next().getName());
List<DefDescriptor<ModelDef>> mdd = component.getModelDefDescriptors();
assertEquals(1, mdd.size());
assertEquals("TestJavaModel", mdd.get(0).getName());
List<DefDescriptor<ControllerDef>> cds = component.getControllerDefDescriptors();
assertEquals(1, cds.size());
assertEquals("JavaTestController", cds.get(0).getName());
DefDescriptor<ModelDef> lmdd = component.getLocalModelDefDescriptor();
assertEquals("TestJavaModel", lmdd.getName());
ModelDef model = component.getModelDef();
assertEquals("TestJavaModel", model.getName());
ControllerDef controller = component.getControllerDef();
assertEquals("testComponent1", controller.getName());
DefDescriptor<RendererDef> rd = component.getRendererDescriptor();
assertEquals("testComponent1", rd.getName());
DefDescriptor<StyleDef> td = component.getStyleDescriptor();
assertEquals("testComponent1", td.getName());
}