File tree Expand file tree Collapse file tree 4 files changed +15
-20
lines changed
hibernate-integrationtest-java-modules
org/hibernate/orm/integrationtest/java/module/test Expand file tree Collapse file tree 4 files changed +15
-20
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,7 @@ dependencies {
2424 api project( ' :hibernate-envers' )
2525 implementation project( ' :hibernate-scan-jandex' )
2626
27- // todo : to get rid of these
28- testImplementation testLibs. junit4
29- testImplementation testLibs. junit4Engine
27+ testImplementation testLibs. junitJupiterApi
3028
3129 // Provide the jakarta.cdi module, as it's required by module jakarta.transaction
3230 // but not provided as transitive dependency of Narayana.
Original file line number Diff line number Diff line change 2222 * Test-only configuration.
2323 */
2424
25- opens org .hibernate .orm .integrationtest .java .module .test to junit ;
26- requires junit ;
25+ opens org .hibernate .orm .integrationtest .java .module .test to org . junit . platform . commons ;
26+ requires org . junit . jupiter . api ;
2727}
Original file line number Diff line number Diff line change 44 */
55package org .hibernate .orm .integrationtest .java .module .test ;
66
7-
8-
97import org .hibernate .Session ;
108import org .hibernate .envers .boot .internal .EnversIntegrator ;
119import org .hibernate .orm .integrationtest .java .module .test .service .AuthorService ;
12-
13- import org .junit .Assert ;
14- import org .junit .Test ;
10+ import org .junit .jupiter .api .Test ;
1511
1612import java .util .Arrays ;
1713
18- import static org .junit .Assert .assertEquals ;
14+ import static org .junit .jupiter .api .Assertions .assertEquals ;
15+ import static org .junit .jupiter .api .Assertions .assertTrue ;
1916
2017public class JavaModulePathIT {
2118
@@ -67,9 +64,8 @@ public void integrator() {
6764 }
6865
6966 private void checkIsInModulePath (Class <?> clazz ) {
70- Assert .assertTrue (
71- clazz + " should be part of a named module - there is a problem in test setup" ,
72- clazz .getModule ().isNamed ()
67+ assertTrue ( clazz .getModule ().isNamed (),
68+ clazz + " should be part of a named module - there is a problem in test setup"
7369 );
7470 }
7571}
Original file line number Diff line number Diff line change 1414import org .hibernate .boot .archive .scan .spi .ClassDescriptor ;
1515import org .hibernate .boot .archive .scan .spi .ScanResult ;
1616import org .hibernate .orm .integrationtest .java .module .test .entity .Author ;
17+ import org .junit .jupiter .api .Test ;
1718
18- import org .junit .Assert ;
19- import org .junit .Test ;
19+ import static org .junit .jupiter . api . Assertions . assertEquals ;
20+ import static org .junit .jupiter . api . Assertions . assertNotNull ;
2021
2122/**
2223 * We need to test that the scanner works, including when there is a module-info.class
@@ -34,11 +35,11 @@ public void verifyModuleInfoScanner() {
3435 StandardScanParameters .INSTANCE
3536 );
3637 Set <ClassDescriptor > locatedClasses = scan .getLocatedClasses ();
37- Assert . assertEquals ( 1 , locatedClasses .size () );
38+ assertEquals ( 1 , locatedClasses .size () );
3839 ClassDescriptor classDescriptor = locatedClasses .iterator ().next ();
39- Assert . assertNotNull ( classDescriptor );
40- Assert . assertEquals ( Author .class .getName (), classDescriptor .getName () );
41- Assert . assertEquals ( ClassDescriptor .Categorization .MODEL , classDescriptor .getCategorization () );
40+ assertNotNull ( classDescriptor );
41+ assertEquals ( Author .class .getName (), classDescriptor .getName () );
42+ assertEquals ( ClassDescriptor .Categorization .MODEL , classDescriptor .getCategorization () );
4243 }
4344
4445}
You can’t perform that action at this time.
0 commit comments