Add design tests for Hibernate usage guidelines #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PullRequest was added the HibernateDesignTests.java test class that contains design tests.
We wrote design tests for domain model rules (design rules for persistent classes) that are described on documentation of the Hibernate Framework (See in https://docs.jboss.org/hibernate/orm/5.0/userGuide/en-US/html/ch02.html) and on the JPA Specification.
For the implementation of design tests, we use the API DesignWizard (http://designwizard.org/) and the TestNG framework to unit tests (http://testng.org). The DesignWizard extracts the design information from binary code and allows you to write design rules. The TestNG was used to implement the design tests how unit tests. It too allows the use of soft assertions (you can use the JUnit framework, but it doesn't allow soft assertions).
The tests related to the use of java collections should be analyzed and be removed when not used according to the collection (List or Set).