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

Missing tests for @SoftDelete #1890

Open
5 tasks
DavideD opened this issue Apr 19, 2024 · 0 comments
Open
5 tasks

Missing tests for @SoftDelete #1890

DavideD opened this issue Apr 19, 2024 · 0 comments
Labels
good first issue Good for newcomers testing Improvements to test suite

Comments

@DavideD
Copy link
Member

DavideD commented Apr 19, 2024

We have created a test for the support of @SoftDelete: SoftDeleteTest

The problem is that we only test entities that are mapped on a single table in the database. And, we don't test the use of @SoftDelete on associations.

We need additional tests with entities mapped using the different inheritance types.

As a guideline for first timers, to solve this issue one has to:

  • Rename SoftDeleteTest to SoftDeleteSingleTableTest
  • Mimic the existing test, but change the entities so that they use @Inheritance(strategy = InheritanceType.JOINED)
  • Mimic the existing test, but change the entities so that they use @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
  • Test @SoftDelete applied to a collection (might be a separate test class or a test method added to the previous one)
  • Maybe it would helpful to also add a test for the other converters (now we only test the YesNoConverter)

I've collected everything in a single issue, but we could split this task in several issues when required.

@DavideD DavideD added good first issue Good for newcomers testing Improvements to test suite labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers testing Improvements to test suite
Projects
None yet
Development

No branches or pull requests

1 participant