abstract class TestCordapp
Encapsulates a CorDapp that exists on the current classpath, which can be pulled in for testing. Use TestCordapp.findCordapp to locate an existing CorDapp.
This is a replacement API to DriverParameters.extraCordappPackagesToScan and MockNetwork.cordappPackages as they create custom jars which do not preserve any CorDapp metadata.
See Also
DriverParameters.cordappsForAllNodes
NodeParameters.additionalCordapps
MockNetworkParameters.cordappsForAllNodes
MockNodeParameters.additionalCordapps
TestCordapp()
Encapsulates a CorDapp that exists on the current classpath, which can be pulled in for testing. Use TestCordapp.findCordapp to locate an existing CorDapp. |
abstract val config: Map<String, Any>
Returns the config for on this CorDapp, defaults to empty if not specified. |
abstract fun withConfig(config: Map<String, Any>): TestCordapp
Returns a copy of this TestCordapp but with the specified CorDapp config. |
fun findCordapp(scanPackage: String): TestCordapp
Scans the current classpath to find the CorDapp that contains the given package. All the CorDapp's metdata present in its MANIFEST are inherited. If more than one location containing the package is found then an exception is thrown. An exception is also thrown if no CorDapp is found. |