我正在使用gradle + Eclipse(Oxygen),我正在尝试为我的Corda应用程序实现单元测试,为此我遵循https://docs.corda.net/tutorial-test-dsl.html的示例
他们在这里使用过:
import static net.corda.core.testing.JavaTestHelpers.*;
import static net.corda.core.contracts.JavaTestHelpers.*;
@Test
public void emptyLedger() {
ledger(l -> {
return Unit.INSTANCE; // We need to return this explicitly
});
}
这里我得到的编译时错误如下:
The import net.corda.core.testing cannot be resolved.
There is no package called net.corda.core.testing, and no javadocs.
答案 0 :(得分:1)
Corda测试库位于["2017-11-16T12:12:50.323Z", "2017-11-15T16:13:24.219Z", "2017-11-14T16:13:55.449Z", "2017-11-13T06:56:21.332Z"]
包中,而不是["2017-11-16T12:12:50.323Z", "2017-11-15T16:13:24.219Z"]
["2017-11-15T16:13:24.219Z", "2017-11-14T16:13:55.449Z"]
["2017-11-14T16:13:55.449Z", "2017-11-13T06:56:21.332Z"]
。