@DoNotImplement 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
<init> |
Encapsulates a CorDapp that exists on the current classpath, which can be pulled in for testing. Use TestCordapp.findCordapp to locate an existing CorDapp. TestCordapp() |
config |
Returns the config for on this CorDapp, defaults to empty if not specified. abstract val config: Map<String, Any> |
withConfig |
Returns a copy of this TestCordapp but with the specified CorDapp config. abstract fun withConfig(config: Map<String, Any>): TestCordapp |
findCordapp |
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. fun findCordapp(scanPackage: String): TestCordapp |