首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用AndroidAnnotation EBean测试JUnit

用AndroidAnnotation EBean测试JUnit
EN

Stack Overflow用户
提问于 2014-06-10 09:10:49
回答 1查看 304关注 0票数 0

我想测试我的@EBean注释类:

代码语言:javascript
复制
public class ApiTests extends AndroidTestCase {

    private Api mApi;

    @Override
    protected void setUp() throws Exception {
        super.setUp();

        mApi = Api_.getInstance_(getContext());
    }
}

但是我得到了编译器错误:

代码语言:javascript
复制
Warning:java: /Users/*****/api/Api.class: warning: Cannot find annotation method 'scope()' in type 'org.androidannotations.annotations.EBean': class file for org.androidannotations.annotations.EBean not found

IDE (IntelliJ IDEA)没有显示任何导入错误。我该怎么测试呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-06-11 09:00:31

解决了。API库应该作为“编译”添加到主项目中,并作为“提供”添加到测试项目中。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24137046

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档