BUILD: Fix some warnings about @BelongsToContract in tests. (#4902)

This commit is contained in:
Chris Rankin
2019-03-19 18:16:24 +00:00
committed by Rick Parker
parent dc179d4ea1
commit 3333464c39
7 changed files with 13 additions and 5 deletions

View File

@ -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()
}

View File

@ -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()
}