jhipster-dotnetcore
jhipster-dotnetcore copied to clipboard
Add unit tests for related entities on the generated app
Overview of the feature request
Add unit tests for related entities on the generated dotnet application.
As an example: Unit tests for Employee should test adding and removing its Department relationship.
Motivation for or Use Case
Currently the unit tests only adds/removes the main entity. Changes to the generator may cause issues regarding relationships and are not caught by tests. This is important to make sure that new PR's are not breaking relationship functionality at this project.
Related issues or PR
- [x] Checking this box is mandatory (this is just to show you read everything)
Does the Java template generate these test? I was going to peek at the implementation if it does.
Does the Java template generate these test? I was going to peek at the implementation if it does.
Last time I checked the main Jhipster generator didn't generate tests for relationships. Currently the tests only check if relationship is required.
The idea would be to create unit tests that:
- creates the main entity
- also creates the dependant entities
- saves the entity graph to the database
- verifies that all entities were created/updated
- also deletes dependant entities and checks if it was properly deleted