ScanPackageTestCordapp

data class ScanPackageTestCordapp(val scanPackage: String, val config: Map<String, Any> = emptyMap(), val signed: Boolean = false) : TestCordappInternal

Implementation of the public TestCordapp API.

As described in TestCordapp.findCordapp, this represents a single CorDapp jar on the current classpath. The scanPackage may be for an external dependency to the project that's using this API, in which case that dependency jar is referenced as is. On the other hand, the scanPackage may reference a gradle CorDapp project on the local system. In this scenerio the project's "jar" task is executed to build the CorDapp jar. This allows us to inherit the CorDapp's MANIFEST information without having to do any extra processing.

Constructors

Link copied to clipboard
constructor(scanPackage: String, config: Map<String, Any> = emptyMap(), signed: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val config: Map<String, Any>

Returns the config for on this CorDapp, defaults to empty if not specified.

Link copied to clipboard
open override val jarFile: Path

The jar file this CorDapp represents. Different CorDapps may point to the same file.

Link copied to clipboard
Link copied to clipboard
val signed: Boolean = false

Functions

Link copied to clipboard
open override fun asSigned(): TestCordapp

Returns a copy of this TestCordapp signed with a development signing key. The same signing key will be used for all signed TestCordapps. If the CorDapp jar is already signed, then the new jar created will its signing key replaced by the development key.

Link copied to clipboard
open override fun withConfig(config: Map<String, Any>): ScanPackageTestCordapp

Returns a copy of this TestCordapp but with the specified CorDapp config.

Link copied to clipboard

Return a copy of this TestCordappInternal but without any metadata, such as configs and signing information.