Fixes an error in the contract testing tutorial.

This commit is contained in:
Joel Dudley 2017-11-27 12:02:02 +00:00 committed by GitHub
parent e13f64b1b3
commit 247c57766c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,14 +35,18 @@ We start with the empty ledger:
.. sourcecode:: java
import static net.corda.core.testing.JavaTestHelpers.*;
import static net.corda.core.contracts.JavaTestHelpers.*;
import kotlin.Unit;
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 Unit.INSTANCE;
});
}
}
The DSL keyword ``ledger`` takes a closure that can build up several transactions and may verify their overall