mirror of
https://github.com/corda/corda.git
synced 2024-12-21 13:57:54 +00:00
Remove unused test class (#4139)
This commit is contained in:
parent
f159629e36
commit
8ddd8d383d
@ -13,7 +13,6 @@ import kotlin.test.assertEquals
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class ContractsDSLTests {
|
||||
class UnwantedCommand : CommandData
|
||||
|
||||
interface TestCommands : CommandData {
|
||||
@ -21,14 +20,12 @@ class ContractsDSLTests {
|
||||
class CommandTwo : TypeOnlyCommandData(), TestCommands
|
||||
}
|
||||
|
||||
private companion object {
|
||||
val megaCorp = TestIdentity(CordaX500Name("MegaCorp", "London", "GB"))
|
||||
val miniCorp = TestIdentity(CordaX500Name("MiniCorp", "London", "GB"))
|
||||
|
||||
val validCommandOne = CommandWithParties(listOf(megaCorp.publicKey, miniCorp.publicKey), listOf(megaCorp.party, miniCorp.party), TestCommands.CommandOne())
|
||||
val validCommandTwo = CommandWithParties(listOf(megaCorp.publicKey), listOf(megaCorp.party), TestCommands.CommandTwo())
|
||||
val invalidCommand = CommandWithParties(emptyList(), emptyList(), UnwantedCommand())
|
||||
}
|
||||
|
||||
@RunWith(Parameterized::class)
|
||||
class RequireSingleCommandTests(private val testFunction: (Collection<CommandWithParties<CommandData>>) -> CommandWithParties<CommandData>,
|
||||
@ -60,7 +57,7 @@ class ContractsDSLTests {
|
||||
val commands = listOf(invalidCommand)
|
||||
Assertions.assertThatThrownBy { testFunction(commands) }
|
||||
.isInstanceOf(IllegalStateException::class.java)
|
||||
.hasMessage("Required net.corda.core.contracts.ContractsDSLTests.TestCommands command")
|
||||
.hasMessage("Required net.corda.core.contracts.TestCommands command")
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,4 +176,3 @@ class ContractsDSLTests {
|
||||
assertFalse(filteredCommands.contains(validCommandTwo))
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user