Fixes an error in the contract testing tutorial.

This commit is contained in:
Joel Dudley 2017-11-23 11:27:34 +00:00 committed by GitHub
parent 22d29db54b
commit 5c18c57417
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,14 +35,17 @@ We start with the empty ledger:
.. sourcecode:: java
import static net.corda.core.testing.JavaTestHelpers.*;
import static net.corda.core.contracts.JavaTestHelpers.*;
import org.junit.Test;
@Test
public void emptyLedger() {
ledger(l -> {
return Unit.INSTANCE; // We need to return this explicitly
});
import static net.corda.testing.NodeTestUtils.ledger;
public class CommercialPaperTest {
@Test
public void emptyLedger() {
ledger(l -> {
return null;
});
}
}
The DSL keyword ``ledger`` takes a closure that can build up several transactions and may verify their overall