mirror of
https://github.com/corda/corda.git
synced 2025-01-27 14:49:35 +00:00
Fixes an error in the contract testing tutorial.
This commit is contained in:
parent
e13f64b1b3
commit
247c57766c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user