Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrument Factories in Tests #449

Closed
brianweir-da opened this issue Dec 6, 2022 · 4 comments
Closed

Instrument Factories in Tests #449

brianweir-da opened this issue Dec 6, 2022 · 4 comments

Comments

@brianweir-da
Copy link
Collaborator

brianweir-da commented Dec 6, 2022

Currently in the Daml-Finance test suite, the tests create instruments directly thusly bypassing their related Factory. In order to make the tests closer to how the library is expected to be used, update the tests to use their related Factory instead.

@GeorgSchneider
Copy link
Contributor

This only pertains to end-to-end tests, unit tests can (and should) take shortcuts. To be revisited as part of separating unit from e2e tests.

@markus-da
Copy link
Contributor

Our current implementation to solve #753 requires the use of a factory in order to work (and be tested in the repo). I have changed it for the Callable Bond test, and the code did not get that much more complicated. It is also in a test util function, so the code is being reused for all callable bonds. @georg-da I would suggest changing this for the other dynamic instruments as well, what do you think?

@markus-da markus-da self-assigned this Jul 5, 2023
@markus-da markus-da modified the milestones: release-vnext, release-2.7 Jul 5, 2023
@markus-da markus-da removed their assignment Jul 11, 2023
@markus-da
Copy link
Contributor

This has now been implemented for the dynamic instruments.

@markus-da markus-da modified the milestones: release-2.7, release-vnext Jul 11, 2023
@matteolimberto-da
Copy link
Contributor

This has now been implemented for all remaining instruments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants