File tree Expand file tree Collapse file tree 4 files changed +104
-0
lines changed
src/test/java/io/quarkus/arc/tck Expand file tree Collapse file tree 4 files changed +104
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" >
5+ <modelVersion >4.0.0</modelVersion >
6+
7+ <parent >
8+ <groupId >io.quarkus.arc</groupId >
9+ <artifactId >arc-parent</artifactId >
10+ <version >999-SNAPSHOT</version >
11+ </parent >
12+
13+ <artifactId >arc-lang-model-tck-runner</artifactId >
14+ <name >ArC - Lang Model TCK Runner</name >
15+
16+ <dependencyManagement >
17+ <dependencies >
18+ <dependency >
19+ <groupId >org.jboss.arquillian</groupId >
20+ <artifactId >arquillian-bom</artifactId >
21+ <version >${version.arquillian} </version >
22+ <type >pom</type >
23+ <scope >import</scope >
24+ </dependency >
25+ </dependencies >
26+ </dependencyManagement >
27+
28+ <dependencies >
29+ <dependency >
30+ <groupId >io.quarkus.arc</groupId >
31+ <artifactId >arc-arquillian</artifactId >
32+ </dependency >
33+ <dependency >
34+ <groupId >jakarta.enterprise</groupId >
35+ <artifactId >cdi-tck-lang-model</artifactId >
36+ <version >${version.cdi-tck} </version >
37+ </dependency >
38+ <dependency >
39+ <groupId >junit</groupId >
40+ <artifactId >junit</artifactId >
41+ <version >${version.junit4} </version >
42+ </dependency >
43+ <dependency >
44+ <groupId >org.jboss.arquillian.junit</groupId >
45+ <artifactId >arquillian-junit-container</artifactId >
46+ </dependency >
47+ </dependencies >
48+
49+ </project >
Original file line number Diff line number Diff line change 1+ package io .quarkus .arc .tck ;
2+
3+ import jakarta .enterprise .inject .build .compatible .spi .BuildCompatibleExtension ;
4+ import jakarta .enterprise .inject .build .compatible .spi .Discovery ;
5+ import jakarta .enterprise .inject .build .compatible .spi .Enhancement ;
6+ import jakarta .enterprise .inject .build .compatible .spi .ScannedClasses ;
7+ import jakarta .enterprise .lang .model .declarations .ClassInfo ;
8+
9+ import org .jboss .cdi .lang .model .tck .LangModelVerifier ;
10+
11+ public class LangModelTckExtension implements BuildCompatibleExtension {
12+ @ Discovery
13+ public void addClass (ScannedClasses scan ) {
14+ // `LangModelVerifier` has no bean defining annotation
15+ // and isn't discovered in annotated discovery
16+ scan .add (LangModelVerifier .class .getName ());
17+ }
18+
19+ @ Enhancement (types = LangModelVerifier .class )
20+ public void run (ClassInfo clazz ) {
21+ LangModelVerifier .verify (clazz );
22+ }
23+ }
Original file line number Diff line number Diff line change 1+ package io .quarkus .arc .tck ;
2+
3+ import jakarta .enterprise .inject .build .compatible .spi .BuildCompatibleExtension ;
4+
5+ import org .jboss .arquillian .container .test .api .Deployment ;
6+ import org .jboss .arquillian .junit .Arquillian ;
7+ import org .jboss .cdi .lang .model .tck .LangModelVerifier ;
8+ import org .jboss .shrinkwrap .api .Archive ;
9+ import org .jboss .shrinkwrap .api .ShrinkWrap ;
10+ import org .jboss .shrinkwrap .api .asset .EmptyAsset ;
11+ import org .jboss .shrinkwrap .api .spec .JavaArchive ;
12+ import org .junit .Test ;
13+ import org .junit .runner .RunWith ;
14+
15+ @ RunWith (Arquillian .class )
16+ public class LangModelTest {
17+ @ Deployment
18+ public static Archive <?> deployment () {
19+ return ShrinkWrap .create (JavaArchive .class )
20+ .addPackage (LangModelVerifier .class .getPackage ())
21+ .addClasses (LangModelTest .class , LangModelTckExtension .class )
22+ .addAsServiceProvider (BuildCompatibleExtension .class , LangModelTckExtension .class )
23+ .addAsManifestResource (EmptyAsset .INSTANCE , "beans.xml" );
24+ }
25+
26+ @ Test
27+ public void test () {
28+ // the test itself runs in LangModelTckExtension
29+ // and if it fails, deployment fails
30+ }
31+ }
Original file line number Diff line number Diff line change 7373 <module >atinject-tck-runner</module >
7474 <module >cdi-tck-porting-pkg</module >
7575 <module >cdi-tck-runner</module >
76+ <module >lang-model-tck-runner</module >
7677 </modules >
7778
7879 <dependencyManagement >
You can’t perform that action at this time.
0 commit comments