2

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」があります。

4

2 に答える 2