com.r3corda.core.testing / ledger

# ledger

`fun ledger(identityService: IdentityService = MOCK_IDENTITY_SERVICE, storageService: StorageService = MockStorageService(), dsl: LedgerDSL<TestTransactionDSLInterpreter, TestLedgerDSLInterpreter>.() -> Unit): LedgerDSL<TestTransactionDSLInterpreter, TestLedgerDSLInterpreter>`

Creates and tests a ledger built by the passed in dsl.

### Parameters

`identityService` - : The IdentityService to be used while building the ledger.
`storageService` - : The StorageService to be used for storing e.g. Attachments.
`dsl` - : The dsl building the ledger.
`fun TransactionDSLInterpreter.ledger(dsl: LedgerDSL<TestTransactionDSLInterpreter, TestLedgerDSLInterpreter>.() -> Unit): Unit`
Deprecated: ledger doesn't nest, use tweak

Here follows implementations of the LedgerDSLInterpreter and TransactionDSLInterpreter interfaces to be used in tests. Top level primitives ledger and transaction that bind the interpreter types are also defined here.

`fun LedgerDSLInterpreter<TransactionDSLInterpreter>.ledger(dsl: LedgerDSL<TestTransactionDSLInterpreter, TestLedgerDSLInterpreter>.() -> Unit): Unit`
Deprecated: ledger doesn't nest, use tweak