GenericUnloaderTest.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:xtext-core 作者:
@Test public void testHandleContentAdapter() throws Exception {
    EPackage root = createExample();
    EContentAdapter eContentAdapter = new EContentAdapter();
    root.eAdapters().add(eContentAdapter);
    IReferableElementsUnloader.GenericUnloader genericUnloader = new IReferableElementsUnloader.GenericUnloader();
    try {
        genericUnloader.unloadRoot(root);
    } catch (StackOverflowError e) {
        e.printStackTrace();
        fail("Unload does not cope with contentAdpaters");
    }
    // isEmtpy() does not work in EMF 3.5
    assertEquals(0, root.eAdapters().size());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号