}
public void testGetNamespaceDef() throws Exception {
DefinitionService defService = Aura.getDefinitionService();
DefDescriptor<NamespaceDef> descriptor = defService.getDefDescriptor("aura", NamespaceDef.class);
NamespaceDef def = descriptor.getDef();
assertNotNull(def);
descriptor = defService.getDefDescriptor("nonExistantNamespace", NamespaceDef.class);
try {
descriptor.getDef();
fail("Expected Exception when trying to compile non-existent NamespaceDef");
} catch (Exception e) {
checkExceptionFull(e, DefinitionNotFoundException.class,
"No NAMESPACE named markup://nonExistantNamespace found");
}
descriptor = defService.getDefDescriptor("namespaceDefTest", NamespaceDef.class);
def = descriptor.getDef();
assertNotNull(def);
assertEquals("red", def.getStyleTokens().get("FOO"));
}