mirror of
https://github.com/corda/corda.git
synced 2025-01-18 18:56:28 +00:00
Minor: Fix deprecation warnings from a unit test.
This commit is contained in:
parent
b2d0ba7e14
commit
69ba95a961
@ -327,8 +327,8 @@ class TransactionEncumbranceTests {
|
|||||||
// Single encumbrance with different notaries.
|
// Single encumbrance with different notaries.
|
||||||
assertFailsWith<TransactionVerificationException.TransactionNotaryMismatchEncumbranceException> {
|
assertFailsWith<TransactionVerificationException.TransactionNotaryMismatchEncumbranceException> {
|
||||||
TransactionBuilder()
|
TransactionBuilder()
|
||||||
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 1, AutomaticHashConstraint)
|
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 1, AutomaticPlaceholderConstraint)
|
||||||
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY2, 0, AutomaticHashConstraint)
|
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY2, 0, AutomaticPlaceholderConstraint)
|
||||||
.addCommand(Cash.Commands.Issue(), MEGA_CORP.owningKey)
|
.addCommand(Cash.Commands.Issue(), MEGA_CORP.owningKey)
|
||||||
.toLedgerTransaction(ledgerServices)
|
.toLedgerTransaction(ledgerServices)
|
||||||
.verify()
|
.verify()
|
||||||
@ -340,10 +340,10 @@ class TransactionEncumbranceTests {
|
|||||||
assertThatExceptionOfType(TransactionVerificationException.TransactionNotaryMismatchEncumbranceException::class.java)
|
assertThatExceptionOfType(TransactionVerificationException.TransactionNotaryMismatchEncumbranceException::class.java)
|
||||||
.isThrownBy {
|
.isThrownBy {
|
||||||
TransactionBuilder()
|
TransactionBuilder()
|
||||||
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 1, AutomaticHashConstraint)
|
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 1, AutomaticPlaceholderConstraint)
|
||||||
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 3, AutomaticHashConstraint)
|
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 3, AutomaticPlaceholderConstraint)
|
||||||
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY2, 0, AutomaticHashConstraint)
|
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY2, 0, AutomaticPlaceholderConstraint)
|
||||||
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 2, AutomaticHashConstraint)
|
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 2, AutomaticPlaceholderConstraint)
|
||||||
.addCommand(Cash.Commands.Issue(), MEGA_CORP.owningKey)
|
.addCommand(Cash.Commands.Issue(), MEGA_CORP.owningKey)
|
||||||
.toLedgerTransaction(ledgerServices)
|
.toLedgerTransaction(ledgerServices)
|
||||||
.verify()
|
.verify()
|
||||||
@ -357,10 +357,10 @@ class TransactionEncumbranceTests {
|
|||||||
assertThatExceptionOfType(TransactionVerificationException.TransactionNotaryMismatchEncumbranceException::class.java)
|
assertThatExceptionOfType(TransactionVerificationException.TransactionNotaryMismatchEncumbranceException::class.java)
|
||||||
.isThrownBy {
|
.isThrownBy {
|
||||||
TransactionBuilder()
|
TransactionBuilder()
|
||||||
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 1, AutomaticHashConstraint)
|
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 1, AutomaticPlaceholderConstraint)
|
||||||
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 0, AutomaticHashConstraint)
|
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 0, AutomaticPlaceholderConstraint)
|
||||||
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 3, AutomaticHashConstraint)
|
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY, 3, AutomaticPlaceholderConstraint)
|
||||||
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY2, 2, AutomaticHashConstraint)
|
.addOutputState(stateWithNewOwner, Cash.PROGRAM_ID, DUMMY_NOTARY2, 2, AutomaticPlaceholderConstraint)
|
||||||
.addCommand(Cash.Commands.Issue(), MEGA_CORP.owningKey)
|
.addCommand(Cash.Commands.Issue(), MEGA_CORP.owningKey)
|
||||||
.toLedgerTransaction(ledgerServices)
|
.toLedgerTransaction(ledgerServices)
|
||||||
.verify()
|
.verify()
|
||||||
|
Loading…
Reference in New Issue
Block a user