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

domain and service layer tests should not use code from web.rest layer #27707

Open
1 task done
kaidohallik opened this issue Oct 28, 2024 · 1 comment
Open
1 task done

Comments

@kaidohallik
Copy link
Contributor

Overview of the issue

#10686 moved Entity and DTO tests away from web.rest layer but related TestUtil remained in web.rest layer.


Additional note: #10686 moved entities domain/service layer tests from web.rest layer to domain/service layer but missed moving User entity tests from web.rest layer to doamin layer:

Motivation for or Use Case

domain and service layers should not depend on web.rest layer

Reproduce the error
Related issues
Suggest a Fix
  1. wrong layer usage possible solutions:
  • possible solution 1: move TestUtil from web.rest to tests root
  • possible solution 2: create DomainTestUtil, ServiceTestUtil and rename TestUtil to RestTestUtil
  1. User entity tests in wrong package solution: extract User entity tests from web.rest layer to domain layer as this was done for entities in refactor entity's integration test class #10686
JHipster Version(s)

Current main branch, version 8.7.1

JHipster configuration

To provide all information we need, you should run jhipster info in the project root folder (or workspaces root for microservices), and
copy/paste the result here.
jhipster info removes sentitive information like rememberKey, jwtSecretKey. Double check if there is any other sensitive info.

As alternative you can add a JDL wrapped in below structure

JDL definitions
     JDL content here
  

The information is mandatory for bug reports. This will allow us to use automated tests and genarate the broken sample using jhipster from-issue command.

Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)
@mraible
Copy link
Contributor

mraible commented Oct 28, 2024 via email

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
@mraible @mshima @kaidohallik and others