Remove unused test class (#4139)

This commit is contained in:
Anthony Keenan 2018-10-31 12:58:57 +00:00 committed by GitHub
parent f159629e36
commit 8ddd8d383d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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