mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
Merge remote-tracking branch 'open/master' into colljos-merge-160118
This commit is contained in:
@ -13,9 +13,9 @@ import net.corda.finance.flows.CashIssueFlow
|
||||
import net.corda.finance.flows.CashPaymentFlow
|
||||
import net.corda.node.services.Permissions.Companion.invokeRpc
|
||||
import net.corda.node.services.Permissions.Companion.startFlow
|
||||
import net.corda.nodeapi.internal.config.User
|
||||
import net.corda.testing.*
|
||||
import net.corda.testing.driver.driver
|
||||
import net.corda.testing.node.User
|
||||
import net.corda.testing.internal.IntegrationTest
|
||||
import net.corda.testing.internal.IntegrationTestSchemas
|
||||
import net.corda.testing.internal.toDatabaseSchemaName
|
||||
|
@ -17,8 +17,8 @@ import net.corda.finance.flows.CashIssueFlow
|
||||
import net.corda.finance.flows.CashPaymentFlow
|
||||
import net.corda.node.services.Permissions.Companion.invokeRpc
|
||||
import net.corda.node.services.Permissions.Companion.startFlow
|
||||
import net.corda.nodeapi.internal.config.User
|
||||
import net.corda.testing.ALICE_NAME
|
||||
import net.corda.testing.node.User
|
||||
import net.corda.testing.driver.driver
|
||||
import org.graphstream.graph.Edge
|
||||
import org.graphstream.graph.Node
|
||||
|
@ -2,6 +2,7 @@ package net.corda.docs.java.tutorial.testdsl;
|
||||
|
||||
import kotlin.Unit;
|
||||
import net.corda.core.contracts.PartyAndReference;
|
||||
import net.corda.core.contracts.TransactionVerificationException;
|
||||
import net.corda.core.identity.CordaX500Name;
|
||||
import net.corda.finance.contracts.ICommercialPaperState;
|
||||
import net.corda.finance.contracts.JavaCommercialPaper;
|
||||
@ -43,7 +44,8 @@ public class CommercialPaperTest {
|
||||
// DOCEND 1
|
||||
|
||||
// DOCSTART 2
|
||||
@Test
|
||||
// This example test will fail with this exception.
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void simpleCP() {
|
||||
ICommercialPaperState inState = getPaper();
|
||||
ledger(ledgerServices, l -> {
|
||||
@ -58,7 +60,8 @@ public class CommercialPaperTest {
|
||||
// DOCEND 2
|
||||
|
||||
// DOCSTART 3
|
||||
@Test
|
||||
// This example test will fail with this exception.
|
||||
@Test(expected = TransactionVerificationException.ContractRejection.class)
|
||||
public void simpleCPMove() {
|
||||
ICommercialPaperState inState = getPaper();
|
||||
ledger(ledgerServices, l -> {
|
@ -2,6 +2,7 @@ package net.corda.docs.tutorial.testdsl
|
||||
|
||||
import com.nhaarman.mockito_kotlin.doReturn
|
||||
import com.nhaarman.mockito_kotlin.whenever
|
||||
import net.corda.core.contracts.TransactionVerificationException
|
||||
import net.corda.core.crypto.generateKeyPair
|
||||
import net.corda.core.identity.CordaX500Name
|
||||
import net.corda.core.utilities.days
|
||||
@ -53,7 +54,8 @@ class CommercialPaperTest {
|
||||
// DOCEND 1
|
||||
|
||||
// DOCSTART 2
|
||||
@Test
|
||||
// This example test will fail with this exception.
|
||||
@Test(expected = IllegalStateException::class)
|
||||
fun simpleCP() {
|
||||
val inState = getPaper()
|
||||
ledgerServices.ledger(DUMMY_NOTARY) {
|
||||
@ -67,7 +69,8 @@ class CommercialPaperTest {
|
||||
// DOCEND 2
|
||||
|
||||
// DOCSTART 3
|
||||
@Test
|
||||
// This example test will fail with this exception.
|
||||
@Test(expected = TransactionVerificationException.ContractRejection::class)
|
||||
fun simpleCPMove() {
|
||||
val inState = getPaper()
|
||||
ledgerServices.ledger(DUMMY_NOTARY) {
|
Reference in New Issue
Block a user