Commit Graph

118 Commits

Author SHA1 Message Date
Andras Slemmer
4324e33fea testdsl: Removed R type parameter, unify verifies() interface 2016-07-11 14:25:27 +01:00
Andras Slemmer
fb55ceeb79 contracts: Remove Tmp* files 2016-07-11 14:25:27 +01:00
Andras Slemmer
9bb8439dc3 testdsl: Add failsWith to Ledger 2016-07-11 14:25:27 +01:00
Andras Slemmer
cd0299f650 testdsl: Javadoc comments 2016-07-11 14:25:27 +01:00
Andras Slemmer
3d885eb928 testdsl: Clean up TestUtils.kt 2016-07-11 14:25:27 +01:00
Ross Nicoll
0404ef4f62 Standardise error messages regarding state issuance
This makes the error messages when verifying state issuance consistent between
Cash, CommercialPaper and Obligation contracts, in preparation for introducing
a common issue clause between the contracts.
2016-07-11 11:32:36 +01:00
Ross Nicoll
7655356ec2 Minor: Remove unneeded backquotes 2016-07-11 11:32:34 +01:00
Ross Nicoll
ae1d3e96b1 Extend obligation tests to cover input lifecycle checks 2016-07-11 11:30:36 +01:00
Mike Hearn
bbc5c2e981 Merged in mike-july-dependency-upgrades (pull request #200)
Upgrade dependencies, July edition.
2016-07-06 16:25:52 +01:00
Mike Hearn
9e849378cf Minor: add some assertions in the WalletFiller code after a test was observed to fail due to a negative amount. 2016-07-06 14:02:40 +01:00
Mike Hearn
6fb7e59b91 Upgrade dependencies, July edition. 2016-07-06 13:56:22 +01:00
Andras Slemmer
0cf54d1c1f test dsl: Comment full stops 2016-07-06 13:25:08 +01:00
Andras Slemmer
f177b1ffaa test dsl: LastLineShouldTestForVerifiesOrFails->EnforceVerifyOrFail 2016-07-06 13:25:08 +01:00
Andras Slemmer
e31b769fef test dsl: Dsl->DSL, add top-level transaction primitive, add ledger-embedded signAll, other cosmetics 2016-07-06 13:25:08 +01:00
Andras Slemmer
e3d6f51049 contracts, core, node: Port TransactionForTest tests to new DSL 2016-07-06 13:25:08 +01:00
Andras Slemmer
bdda3d239a contracts: Port Java CashTests to new DSL 2016-07-06 13:25:08 +01:00
Andras Slemmer
7634331f68 contracts: Port CashTests to new dsl 2016-07-06 13:25:08 +01:00
Andras Slemmer
f4a6a43aa6 contracts, core: Port CommercialPaperTests, IRSTests, ObligationTests, TransactioGroupTests 2016-07-06 13:25:08 +01:00
Andras Slemmer
cde315aca9 contracts, node: Port CommercialPaperTests, TwoPartyTradeProtocolTests and GroupToGraphConversion to use new dsl 2016-07-06 13:25:08 +01:00
Shams Asari
5c0e7fbbf2 Moved topic parameter from send/receive methods to a ProtocolLogic property 2016-07-05 15:12:25 +01:00
Ross Nicoll
2121824662 Rename com.r3cord.contracts.cash package to ...asset 2016-06-30 13:31:59 +01:00
Ross Nicoll
6dad7efa22 Replace references to cash, with (fungible) asset 2016-06-30 12:47:18 +01:00
Shams Asari
a02263937c send and sendAndReceive use Party for the destination 2016-06-30 12:04:39 +01:00
rick.parker
5271882dcd Event scheduling and docs for event scheduling 2016-06-30 08:51:52 +01:00
Ross Nicoll
c767638127 Move DummyContract.State into its own file
DummyContract.State isn't actually used by the DummyContract any more, so shouldn't
be part of that contract class.
2016-06-29 17:16:46 +01:00
Ross Nicoll
dc304199c8 Remove warnings from Obligation contract 2016-06-29 13:27:00 +01:00
Ross Nicoll
228513671d Move Obligation contract into contracts module 2016-06-27 17:54:04 +01:00
Ross Nicoll
9994d129f2 General cleanup based on first round of feedback
* Rename AggregateCommands to IssuanceCommands
 * Reorder comparisons to be consistent
 * Rename verifyDefaultCommand to verifySetLifecycleCommand
 * Rename currency to issued/product
 * Add note about needing to rethink timestamping
 * Rename issuer to obligor, and owner to beneficiary
 * Move lifecycle inversion code into SetLifecycle command
 * Correct comments regarding cash states
 * Rework description of contractHash parameter
 * Fixes 'netting equal balances due between parties', and add further netting tests
 * Separate calculations involving issued products and the underlying product
 * Use signed transactions in obligation tests
 * Add verification tests for changing lifecycle
2016-06-27 17:49:52 +01:00
Andras Slemmer
bc326660a3 contracts, core: Fix static init cycle issue of JavaTestHelpers 2016-06-24 16:37:43 +01:00
Andras Slemmer
341adafd3a contracts, core: Rename Java to JavaTestHelpers 2016-06-24 16:37:43 +01:00
Andras Slemmer
040e51ec12 contracts, core: Expose top-level DSL values/functions to Java by wrapping them in an object
core: Add overloads for convenient Java interop

contracts, core: Uniform Java interop for tests, use camelCase
2016-06-24 16:37:43 +01:00
Andras Slemmer
28e85923a3 core: Add CashTestsJava.java, containing some of CashTests.kt in Java 2016-06-24 16:37:43 +01:00
Mike Hearn
2dfcff1f31 Testing: Fix the wallet filler code. 2016-06-24 17:13:27 +02:00
Andrius Dagys
aaeb99ac25 Validating notary: check for missing signatures. The notary can only sign if all other signatures are present
Please enter the commit message for your changes. Lines starting
2016-06-23 16:15:14 +01:00
Ross Nicoll
d24ec06b40 Add netting support structures
Add NetType enum for use in contracts which deal with netting
Add BilateralNettingState interface
Add support for more complex issued things
2016-06-22 14:30:06 +01:00
Mike Hearn
7ee6bd05ce Refactor the wallet code:
- Rename NodeWalletService to InMemoryWalletService and move into the core module where it's available for unit testing.
- Make a new NodeWalletService that just inherits from InMemoryWalletService and doesn't customise it at all, for now.
- Take the cash specific functionality out of Wallet and into an extension property in the Cash contract (this compiles as CashKt.getCashBalance(wallet) for java users).
- Return the generated states in the fillWalletWithTestCash function.
2016-06-22 14:49:52 +02:00
Mike Hearn
f3d4639059 Testing: make the WalletFiller code a file-level singleton and fillTestWithCash an extension method. For Java users not much changes, the class is still called WalletFiller and the signature remains the same. Re-order some arguments to make it easier to use when accepting the defaults. 2016-06-22 14:49:52 +02:00
Mike Hearn
cdb3e2f126 Minor: move WalletFiller from node.testing to contracts.testing 2016-06-22 14:49:52 +02:00
Mike Hearn
a16ae677ed Minor: fix some inspector warnings in IRSTests 2016-06-22 13:46:57 +02:00
Mike Hearn
749949669f Minor: Make a few class field names and constructor layouts more consistent. 2016-06-22 13:46:57 +02:00
Mike Hearn
5a3c9caffd Minor: Remove some unused parameters in a unit test utility method 2016-06-22 13:46:57 +02:00
Richard Green
6b80530ac6 Changed DateOffset to be an integer instead of enum. Usages and examples also changed. Also renamed to fixingPeriodOffset
Renamed fixingPeriod -> fixingPeriodOffset in the .json files
2016-06-21 18:17:39 +01:00
Ross Nicoll
723e610dfc Rename verifyMoveCommand()
Rename verifyMoveCommands() to verifyMoveCommand() to represent that move commands must
be singular within a transaction.
2016-06-20 16:08:16 +01:00
Ross Nicoll
af53a52b06 Add common Issue and Move commands
* Add common Issue command to encourage presence of a nonce value when issuing state objects.
* Add common Move command for contracts which support being moved in order to fulfil other contracts.
2016-06-20 16:08:16 +01:00
Andras Slemmer
a2e6e78b16 contracts: Remove warnings 2016-06-20 14:16:13 +01:00
Andras Slemmer
c9cb024bb5 Merged in use-urandom-2 (pull request #166)
Use urandom 3
2016-06-20 14:15:03 +01:00
Andras Slemmer
a7419b116d Add newSecureRandom() that uses a non-blocking SecureRandom provider on Linux 2016-06-20 14:11:03 +01:00
Andrius Dagys
30ca340b6e Refactored NotaryChangeProtocol and tests: moved the proposal verification step into the protocol.
Added another proposal verification step in the NotaryChangeProtocol.
Added the cause exception message to the 'notary change refused' error.
2016-06-17 15:05:35 +01:00
Andrius Dagys
0a5b7ace35 Made TransactionBuilder abstract. Every transaction type now needs to implement and provide its own Builder. This is required since for specific types we need to run different logic when adding new items to the transaction. For example, when adding a new input state to a transaction of type NotaryChange we need to add all of the states participants to the signers list. 2016-06-17 15:05:35 +01:00
Andrius Dagys
9958b5c603 Added 'signers' property to the transaction data models. Signers holds the list of all public keys that need to be signed for (command keys and additional ones such as notary).
Removed Notary & ChangeNotary commands, keys to be signed for are added to the signers list during transaction build phase.
2016-06-17 15:05:35 +01:00