我使用 GWTTestCase 编写简单的测试,这里是:
public class SampleTest extends GWTTestCase {
@Override
public String getModuleName() {
return "path.to.my.one.and.only.Module";
}
public void testSome() {
assertNotNull(null);
}
}
但是当我运行mvn test时,测试失败并出现下一个错误:
[ERROR] Unable to find type 'java.lang.Object'
[ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.648 sec <<< FAILURE!
我的模块中有“com.google.gwt.user.User”。