8000 A testcase is missing for a full settlement to a partially settled IOU · Issue #21 · corda/corda-training-solutions · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
A testcase is missing for a full settlement to a partially settled IOU #21
Open
@ooharawork

Description

@ooharawork

In excercise of IOUContract.kt, I had erroneously ignored paid amount on settlement contract, i.e.

// wrong
val amountOutstanding = inputIou.amount
// correct
val amountOutstanding = inputIou.amount  - inputIou.paid

IOUSettleTests.kt couldn't detect the error.
We needed a test case where we will fully settle an IOU that was partially settled, e.g.

  1. Issue an IOU $10 -> output: one IOU (amount=10, paid=0)
  2. Then settle $5 -> output: one IOU (amount=10, paid=5)
  3. Then settle $5 -> no IOU output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0