mirror of
https://github.com/corda/corda.git
synced 2025-06-18 15:18:16 +00:00
BUILD: Fix some warnings about @BelongsToContract in tests. (#4902)
This commit is contained in:
committed by
Rick Parker
parent
dc179d4ea1
commit
3333464c39
@ -1,9 +1,7 @@
|
||||
package net.corda.core.internal
|
||||
|
||||
import net.corda.client.mock.Generator
|
||||
import net.corda.core.contracts.ContractState
|
||||
import net.corda.core.contracts.StateRef
|
||||
import net.corda.core.contracts.TransactionState
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.SignatureMetadata
|
||||
import net.corda.core.crypto.TransactionSignature
|
||||
@ -30,11 +28,12 @@ class TopologicalSortTest {
|
||||
override val references: List<StateRef> = emptyList()
|
||||
) : CoreTransaction() {
|
||||
override val outputs: List<TransactionState<ContractState>> = (1..numberOfOutputs).map {
|
||||
TransactionState(DummyState(), "", notary)
|
||||
TransactionState(DummyState(), Contract::class.java.name, notary)
|
||||
}
|
||||
override val networkParametersHash: SecureHash? = testNetworkParameters().serialize().hash
|
||||
}
|
||||
|
||||
@BelongsToContract(Contract::class)
|
||||
class DummyState : ContractState {
|
||||
override val participants: List<AbstractParty> = emptyList()
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import kotlin.test.assertFailsWith
|
||||
|
||||
class VaultUpdateTests {
|
||||
private companion object {
|
||||
const val DUMMY_PROGRAM_ID = "net.corda.core.node.VaultUpdateTests.DummyContract"
|
||||
const val DUMMY_PROGRAM_ID = "net.corda.core.node.VaultUpdateTests\$DummyContract"
|
||||
val DUMMY_NOTARY = TestIdentity(DUMMY_NOTARY_NAME, 20).party
|
||||
val emptyUpdate = Vault.Update(emptySet(), emptySet(), type = Vault.UpdateType.GENERAL, references = emptySet())
|
||||
}
|
||||
@ -25,6 +25,7 @@ class VaultUpdateTests {
|
||||
}
|
||||
}
|
||||
|
||||
@BelongsToContract(DummyContract::class)
|
||||
private class DummyState : ContractState {
|
||||
override val participants: List<AbstractParty> = emptyList()
|
||||
}
|
||||
|
Reference in New Issue
Block a user