corda / net.corda.testing.services / MockAttachmentStorage

MockAttachmentStorage

class MockAttachmentStorage

A mock implementation of AttachmentStorage for use within tests

Constructors

<init>

MockAttachmentStorage()

A mock implementation of AttachmentStorage for use within tests

Properties

files

val files: Map<<ERROR CLASS>, <ERROR CLASS><<ERROR CLASS>, ByteArray>>

A map of the currently stored files by their SecureHash

Functions

getAttachmentIdAndBytes

fun getAttachmentIdAndBytes(jar: InputStream): <ERROR CLASS><<ERROR CLASS>, ByteArray>

getLatestContractAttachments

fun getLatestContractAttachments(contractClassName: String, minContractVersion: Int): List<<ERROR CLASS>>

hasAttachment

fun hasAttachment(attachmentId: <ERROR CLASS>): Boolean

importAttachment

fun importAttachment(jar: InputStream): <ERROR CLASS>
fun importAttachment(jar: InputStream, uploader: String, filename: String?): <ERROR CLASS>

importContractAttachment

fun importContractAttachment(contractClassNames: List<<ERROR CLASS>>, uploader: String, jar: InputStream, attachmentId: <ERROR CLASS>? = null, signers: List<PublicKey> = emptyList()): <ERROR CLASS>
fun importContractAttachment(attachmentId: <ERROR CLASS>, contractAttachment: <ERROR CLASS>): Unit

importOrGetAttachment

fun importOrGetAttachment(jar: InputStream): <ERROR CLASS>

openAttachment

fun openAttachment(id: <ERROR CLASS>): <ERROR CLASS>?

queryAttachments

fun queryAttachments(criteria: <ERROR CLASS>, sorting: <ERROR CLASS>?): List<<ERROR CLASS>>