b373241304114687bf289693950d1bb220a0d1ad
[JavaForFun] /
1 package de.example.custom.java.checks;
2
3 import org.junit.Test;
4 import org.sonar.java.checks.verifier.JavaCheckVerifier;
5
6 public class SpringServiceInstanceFieldCheckTest {
7           private static final String NAMED_ANNOTATION = "src/test/files/checks/SpringServiceNamedAnnotationInstanceFieldCheck.java";
8           private static final String SPRING_SERVICE_ANNOTATION = "src/test/files/checks/SpringServiceAnnotationInstanceFieldCheck.java";
9
10           @Test
11           public void whenNamedAnnotationAndNoStaticOrFinalField() {
12             JavaCheckVerifier.verify(NAMED_ANNOTATION, new SpringServiceInstanceFieldCheck());
13           }
14           
15           @Test
16           public void whenSpringServiceAnnotationAndNoStaticOrFinalField() {
17             JavaCheckVerifier.verify(SPRING_SERVICE_ANNOTATION, new SpringServiceInstanceFieldCheck());
18           }
19 }