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

Refactor tests to reduce duplication #42

Open
holly-cummins opened this issue Jan 4, 2023 · 0 comments
Open

Refactor tests to reduce duplication #42

holly-cummins opened this issue Jan 4, 2023 · 0 comments

Comments

@holly-cummins
Copy link
Contributor

At the moment, for both provider and consumer, the tests have the test methods and sample code duplicated 2-4 times. For example, the test methods are in a normal mode deployment test, a dev mode deployment test, a normal mode integration test, and a dev mode integration test.

We should be able to reduce this duplication. Inheritance is an obvious option, but may not be the right one, for the reasons described in https://www.petrikainulainen.net/programming/unit-testing/3-reasons-why-we-should-not-use-inheritance-in-our-tests/ and https://medium.com/decisionbrain/factor-test-code-the-junit-5-way-that-is-without-inheritance-9ba2784d34 - but annotations might significantly affect the running of the tests, given that annotations are a major cause of problems in this context. So it needs thought.

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

No branches or pull requests

1 participant