1010import static org .junit .jupiter .api .Assertions .assertTrue ;
1111
1212@ NullMarked
13- class JspecifyMapStructMapperAnnotationCheckTest extends CheckTestSupport {
13+ class JSpecifyMapStructMapperAnnotationCheckTest extends CheckTestSupport {
1414
1515 private static final String BASE = "/it/aboutbits/checkstyle/jspecifyMapStructMapperAnnotation/" ;
1616
1717 @ Test
1818 void wellOrderedMapperPasses () throws Exception {
19- assertEquals (List .of (), runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "GoodMapper.java" ));
19+ assertEquals (List .of (), runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "GoodMapper.java" ));
2020 }
2121
2222 @ Test
2323 void mapperWithNamedValueArgumentPasses () throws Exception {
2424 assertEquals (
2525 List .of (),
26- runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "GoodMapperNamedValue.java" )
26+ runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "GoodMapperNamedValue.java" )
2727 );
2828 }
2929
3030 @ Test
3131 void swappedOrderFails () throws Exception {
32- var v = runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "BadOrderSwapped.java" );
32+ var v = runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "BadOrderSwapped.java" );
3333 assertEquals (1 , v .size ());
3434 assertTrue (v .getFirst ().contains ("BadOrderSwapped" ), v .toString ());
3535 }
3636
3737 @ Test
3838 void missingAnnotateWithFails () throws Exception {
39- var v = runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "BadMissingAnnotateWith.java" );
39+ var v = runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "BadMissingAnnotateWith.java" );
4040 assertEquals (1 , v .size ());
4141 }
4242
4343 @ Test
4444 void annotateWithWrongClassLiteralFails () throws Exception {
45- var v = runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "BadWrongClassLiteral.java" );
45+ var v = runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "BadWrongClassLiteral.java" );
4646 assertEquals (1 , v .size ());
4747 }
4848
4949 @ Test
5050 void interfaceWithoutMapperIsIgnored () throws Exception {
5151 assertEquals (
5252 List .of (),
53- runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "NonMapperInterfaceIgnored.java" )
53+ runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "NonMapperInterfaceIgnored.java" )
5454 );
5555 }
5656
5757 @ Test
5858 void customMapperAnnotationNameIsHonored () throws Exception {
5959 var properties = Map .of ("mapperAnnotationName" , "MyMapper" );
6060
61- var ok = runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "CustomMapperGood.java" , properties );
61+ var ok = runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "CustomMapperGood.java" , properties );
6262 assertEquals (List .of (), ok );
6363
64- var bad = runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "CustomMapperBad.java" , properties );
64+ var bad = runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "CustomMapperBad.java" , properties );
6565 assertEquals (1 , bad .size ());
6666 assertTrue (bad .getFirst ().contains ("CustomMapperBad" ), bad .toString ());
6767 }
@@ -70,35 +70,35 @@ void customMapperAnnotationNameIsHonored() throws Exception {
7070 void customAnnotateWithAnnotationNameIsHonored () throws Exception {
7171 var properties = Map .of ("annotateWithAnnotationName" , "MyAnnotateWith" );
7272
73- var ok = runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "CustomAnnotateWithGood.java" , properties );
73+ var ok = runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "CustomAnnotateWithGood.java" , properties );
7474 assertEquals (List .of (), ok );
7575
76- var bad = runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "GoodMapper.java" , properties );
76+ var bad = runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "GoodMapper.java" , properties );
7777 assertEquals (1 , bad .size (), bad .toString ());
7878 }
7979
8080 @ Test
8181 void customNullUnmarkedAnnotationNameIsHonored () throws Exception {
8282 var properties = Map .of ("nullUnmarkedAnnotationName" , "MyUnmarked" );
8383
84- var ok = runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "CustomNullUnmarkedGood.java" , properties );
84+ var ok = runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "CustomNullUnmarkedGood.java" , properties );
8585 assertEquals (List .of (), ok );
8686
87- var bad = runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "GoodMapper.java" , properties );
87+ var bad = runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "GoodMapper.java" , properties );
8888 assertEquals (1 , bad .size (), bad .toString ());
8989 }
9090
9191 @ Test
9292 void wellOrderedAbstractClassMapperPasses () throws Exception {
9393 assertEquals (
9494 List .of (),
95- runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "GoodAbstractMapper.java" )
95+ runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "GoodAbstractMapper.java" )
9696 );
9797 }
9898
9999 @ Test
100100 void abstractClassMapperWithSwappedOrderFails () throws Exception {
101- var v = runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "BadAbstractMapperOrderSwapped.java" );
101+ var v = runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "BadAbstractMapperOrderSwapped.java" );
102102 assertEquals (1 , v .size ());
103103 assertTrue (v .getFirst ().contains ("BadAbstractMapperOrderSwapped" ), v .toString ());
104104 }
@@ -107,7 +107,7 @@ void abstractClassMapperWithSwappedOrderFails() throws Exception {
107107 void nonAbstractClassWithMapperAnnotationIsIgnored () throws Exception {
108108 assertEquals (
109109 List .of (),
110- runCheck (JspecifyMapStructMapperAnnotationCheck .class , BASE + "NonAbstractClassWithMapperAnnotationIgnored.java" )
110+ runCheck (JSpecifyMapStructMapperAnnotationCheck .class , BASE + "NonAbstractClassWithMapperAnnotationIgnored.java" )
111111 );
112112 }
113113}
0 commit comments