From eae3efdf0247d49ced0b1a295defcd23f8f0dc42 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Fri, 3 Jun 2016 14:30:52 +0100 Subject: [PATCH] Minor: Edit reference after copying amount Edit reference after copying amount in cash tests, so that when the amount includes a reference, the copying doesn't replace the changed reference. --- .../src/test/kotlin/com/r3corda/contracts/cash/CashTests.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/src/test/kotlin/com/r3corda/contracts/cash/CashTests.kt b/contracts/src/test/kotlin/com/r3corda/contracts/cash/CashTests.kt index 221af73de4..bd0ed46e2b 100644 --- a/contracts/src/test/kotlin/com/r3corda/contracts/cash/CashTests.kt +++ b/contracts/src/test/kotlin/com/r3corda/contracts/cash/CashTests.kt @@ -243,8 +243,8 @@ class CashTests { // Can't change deposit reference when splitting. transaction { input { inState } - output { outState.editDepositRef(0).copy(amount = inState.amount / 2) } - output { outState.editDepositRef(1).copy(amount = inState.amount / 2) } + output { outState.copy(amount = inState.amount / 2).editDepositRef(0) } + output { outState.copy(amount = inState.amount / 2).editDepositRef(1) } this `fails requirement` "for deposit [01] at issuer MegaCorp the amounts balance" } // Can't mix currencies.