Merge pull request #1823 from corda/tlil/misc-tutorial-fixes

Tutorial Fixes
This commit is contained in:
Tommy Lillehagen
2017-10-06 16:14:37 +01:00
committed by GitHub
3 changed files with 36 additions and 36 deletions

View File

@ -31,7 +31,7 @@ class CommercialPaperTest {
transaction {
attachments(CP_PROGRAM_ID)
input(CP_PROGRAM_ID) { inState }
this.verifies()
verifies()
}
}
}
@ -46,7 +46,7 @@ class CommercialPaperTest {
input(CP_PROGRAM_ID) { inState }
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Move() }
attachments(CP_PROGRAM_ID)
this.verifies()
verifies()
}
}
}
@ -61,7 +61,7 @@ class CommercialPaperTest {
input(CP_PROGRAM_ID) { inState }
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Move() }
attachments(CP_PROGRAM_ID)
this `fails with` "the state is propagated"
`fails with`("the state is propagated")
}
}
}
@ -76,9 +76,9 @@ class CommercialPaperTest {
input(CP_PROGRAM_ID) { inState }
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Move() }
attachments(CP_PROGRAM_ID)
this `fails with` "the state is propagated"
`fails with`("the state is propagated")
output(CP_PROGRAM_ID, "alice's paper") { inState.withOwner(ALICE) }
this.verifies()
verifies()
}
}
}
@ -95,11 +95,11 @@ class CommercialPaperTest {
// The wrong pubkey.
command(BIG_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
timeWindow(TEST_TX_TIME)
this `fails with` "output states are issued by a command signer"
`fails with`("output states are issued by a command signer")
}
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
timeWindow(TEST_TX_TIME)
this.verifies()
verifies()
}
}
}
@ -115,11 +115,11 @@ class CommercialPaperTest {
// The wrong pubkey.
command(BIG_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
timeWindow(TEST_TX_TIME)
this `fails with` "output states are issued by a command signer"
`fails with`("output states are issued by a command signer")
}
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
timeWindow(TEST_TX_TIME)
this.verifies()
verifies()
}
}
// DOCEND 7
@ -141,7 +141,7 @@ class CommercialPaperTest {
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
attachments(CP_PROGRAM_ID)
timeWindow(TEST_TX_TIME)
this.verifies()
verifies()
}
@ -152,7 +152,7 @@ class CommercialPaperTest {
output(CP_PROGRAM_ID, "alice's paper") { "paper".output<ICommercialPaperState>().withOwner(ALICE) }
command(ALICE_PUBKEY) { Cash.Commands.Move() }
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Move() }
this.verifies()
verifies()
}
}
}
@ -174,7 +174,7 @@ class CommercialPaperTest {
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
attachments(CP_PROGRAM_ID)
timeWindow(TEST_TX_TIME)
this.verifies()
verifies()
}
transaction("Trade") {
@ -184,7 +184,7 @@ class CommercialPaperTest {
output(CP_PROGRAM_ID, "alice's paper") { "paper".output<ICommercialPaperState>().withOwner(ALICE) }
command(ALICE_PUBKEY) { Cash.Commands.Move() }
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Move() }
this.verifies()
verifies()
}
transaction {
@ -192,10 +192,10 @@ class CommercialPaperTest {
// We moved a paper to another pubkey.
output(CP_PROGRAM_ID, "bob's paper") { "paper".output<ICommercialPaperState>().withOwner(BOB) }
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Move() }
this.verifies()
verifies()
}
this.fails()
fails()
}
}
// DOCEND 9
@ -216,7 +216,7 @@ class CommercialPaperTest {
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
attachments(CP_PROGRAM_ID)
timeWindow(TEST_TX_TIME)
this.verifies()
verifies()
}
transaction("Trade") {
@ -226,7 +226,7 @@ class CommercialPaperTest {
output(CP_PROGRAM_ID, "alice's paper") { "paper".output<ICommercialPaperState>().withOwner(ALICE) }
command(ALICE_PUBKEY) { Cash.Commands.Move() }
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Move() }
this.verifies()
verifies()
}
tweak {
@ -235,13 +235,13 @@ class CommercialPaperTest {
// We moved a paper to another pubkey.
output(CP_PROGRAM_ID, "bob's paper") { "paper".output<ICommercialPaperState>().withOwner(BOB) }
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Move() }
this.verifies()
verifies()
}
this.fails()
fails()
}
this.verifies()
verifies()
}
}
// DOCEND 10
}
}