mirror of
https://github.com/corda/corda.git
synced 2025-06-22 00:57:21 +00:00
Remove unnecessary this
in sample code + minor changes to contract paragraph
This commit is contained in:
@ -28,7 +28,7 @@ class CommercialPaperTest {
|
||||
transaction {
|
||||
attachments(CP_PROGRAM_ID)
|
||||
input(CP_PROGRAM_ID) { inState }
|
||||
this.verifies()
|
||||
verifies()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -43,7 +43,7 @@ class CommercialPaperTest {
|
||||
input(CP_PROGRAM_ID) { inState }
|
||||
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Move() }
|
||||
attachments(CP_PROGRAM_ID)
|
||||
this.verifies()
|
||||
verifies()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -58,7 +58,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")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -73,9 +73,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()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -92,11 +92,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()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -112,11 +112,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
|
||||
@ -138,7 +138,7 @@ class CommercialPaperTest {
|
||||
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
|
||||
attachments(CP_PROGRAM_ID)
|
||||
timeWindow(TEST_TX_TIME)
|
||||
this.verifies()
|
||||
verifies()
|
||||
}
|
||||
|
||||
|
||||
@ -149,7 +149,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()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -171,7 +171,7 @@ class CommercialPaperTest {
|
||||
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
|
||||
attachments(CP_PROGRAM_ID)
|
||||
timeWindow(TEST_TX_TIME)
|
||||
this.verifies()
|
||||
verifies()
|
||||
}
|
||||
|
||||
transaction("Trade") {
|
||||
@ -181,7 +181,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 {
|
||||
@ -189,10 +189,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
|
||||
@ -213,7 +213,7 @@ class CommercialPaperTest {
|
||||
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
|
||||
attachments(CP_PROGRAM_ID)
|
||||
timeWindow(TEST_TX_TIME)
|
||||
this.verifies()
|
||||
verifies()
|
||||
}
|
||||
|
||||
transaction("Trade") {
|
||||
@ -223,7 +223,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 {
|
||||
@ -232,13 +232,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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user