Hi,
I’m using the Spring for GraphQL project which provides its own class to make assertions in unit tests.
It seems sonar does not detect the assertions and report a bug:
Add at least one assertion to this test case.
- JaCoCo version: 0.8.8
- Operating system: Ubuntu
- Tool integration: Maven
- Steps to reproduce:
Write a unit test with JUnit making an assertion with the HttpGraphQlTester
from Spring for Graphql
HttpGraphQlTester tester = ...
tester.documentName("search")
.execute()
.path("data.search.total")
.entity(Integer.class)
.equals(2);
Since the HttpGraphQlTester
makes an assertion, no bug should be reported, but sonar does.
Is there any way to avoid such report or should it be fixed directly in sonar source code?
Thanks