Move DummyContract.State into its own file

DummyContract.State isn't actually used by the DummyContract any more, so shouldn't
be part of that contract class.
This commit is contained in:
Ross Nicoll
2016-06-29 14:51:35 +01:00
parent 779034691e
commit c767638127
6 changed files with 30 additions and 13 deletions

View File

@ -5,11 +5,12 @@ import com.r3corda.contracts.cash.CASH_PROGRAM_ID
import com.r3corda.contracts.cash.Cash
import com.r3corda.core.contracts.Amount
import com.r3corda.core.contracts.Contract
import com.r3corda.core.contracts.ContractState
import com.r3corda.core.contracts.DUMMY_PROGRAM_ID
import com.r3corda.core.contracts.DummyContract
import com.r3corda.core.contracts.DummyState
import com.r3corda.core.contracts.PartyAndReference
import com.r3corda.core.contracts.Issued
import com.r3corda.core.contracts.ContractState
import com.r3corda.core.contracts.TransactionState
import com.r3corda.core.crypto.NullPublicKey
import com.r3corda.core.crypto.Party
@ -31,7 +32,7 @@ val TEST_PROGRAM_MAP: Map<Contract, Class<out Contract>> = mapOf(
IRS_PROGRAM_ID to InterestRateSwap::class.java
)
fun generateState() = DummyContract.State(Random().nextInt())
fun generateState() = DummyState(Random().nextInt())
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//

View File

@ -80,7 +80,7 @@ class ObligationTests {
fun `issue debt`() {
// Check we can't "move" debt into existence.
transaction {
input { DummyContract.State() }
input { DummyState() }
output { outState }
arg(MINI_CORP_PUBKEY) { Obligation.Commands.Move(outState.issuanceDef) }

View File

@ -66,7 +66,7 @@ class CashTests {
fun issueMoney() {
// Check we can't "move" money into existence.
transaction {
input { DummyContract.State() }
input { DummyState() }
output { outState }
arg(MINI_CORP_PUBKEY) { Cash.Commands.Move() }