diff --git a/cdi-unit-tests-jandex/pom.xml b/cdi-unit-tests-jandex/pom.xml new file mode 100644 index 00000000..a58b63a7 --- /dev/null +++ b/cdi-unit-tests-jandex/pom.xml @@ -0,0 +1,89 @@ + + 4.0.0 + cdi-unit-tests-jandex + jar + + org.jglue.cdi-unit + cdi-unit-parent + 3.0.2-SNAPSHOT + ../pom.xml + + CDI-Unit-Tests-Jandex + http://jglue.org/cdi-unit + CDI-Unit test suite. + + + Bryn Cooke + + + + UTF-8 + 2.2.0.Final + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + org.jglue.cdi-unit + cdi-unit + 3.0.2-SNAPSHOT + + + org.jboss.weld.se + weld-se + + + test + + + + org.jboss.weld.se + weld-se + ${weld.test.version} + test + + + + junit + junit + 4.8.2 + test + + + org.jboss + jandex + 1.2.0.Final + + + + + + + org.jboss.jandex + jandex-maven-plugin + 1.0.1 + + + make-index + + jandex + + + + + + + + + + + diff --git a/cdi-unit-tests-jandex/src/main/java/org/junit/cdiunit/NonTestClass.java b/cdi-unit-tests-jandex/src/main/java/org/junit/cdiunit/NonTestClass.java new file mode 100644 index 00000000..909f958f --- /dev/null +++ b/cdi-unit-tests-jandex/src/main/java/org/junit/cdiunit/NonTestClass.java @@ -0,0 +1,8 @@ +package org.junit.cdiunit; + +public class NonTestClass { + public void a() { + + } + +} diff --git a/cdi-unit-tests-jandex/src/test/java/org/jglue/cdiunit/AImplementation1.java b/cdi-unit-tests-jandex/src/test/java/org/jglue/cdiunit/AImplementation1.java new file mode 100644 index 00000000..8788b0eb --- /dev/null +++ b/cdi-unit-tests-jandex/src/test/java/org/jglue/cdiunit/AImplementation1.java @@ -0,0 +1,20 @@ +/* + * Copyright 2011 Bryn Cooke + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jglue.cdiunit; + +public class AImplementation1 implements AInterface { + +} diff --git a/cdi-unit-tests-jandex/src/test/java/org/jglue/cdiunit/AInterface.java b/cdi-unit-tests-jandex/src/test/java/org/jglue/cdiunit/AInterface.java new file mode 100644 index 00000000..a5916161 --- /dev/null +++ b/cdi-unit-tests-jandex/src/test/java/org/jglue/cdiunit/AInterface.java @@ -0,0 +1,20 @@ +/* + * Copyright 2011 Bryn Cooke + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jglue.cdiunit; + +public interface AInterface { + +} diff --git a/cdi-unit-tests-jandex/src/test/java/org/jglue/cdiunit/TestCdiRunner.java b/cdi-unit-tests-jandex/src/test/java/org/jglue/cdiunit/TestCdiRunner.java new file mode 100644 index 00000000..488884ba --- /dev/null +++ b/cdi-unit-tests-jandex/src/test/java/org/jglue/cdiunit/TestCdiRunner.java @@ -0,0 +1,27 @@ +package org.jglue.cdiunit; + +import javax.inject.Inject; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.cdiunit.NonTestClass; +import org.junit.runner.RunWith; + +@RunWith(CdiRunner.class) +@AdditionalClasses(AImplementation1.class) +public class TestCdiRunner { + + @Inject + private NonTestClass nonTestClass; + + @Inject + AInterface a; + + @Test + public void testStart() { + Assert.assertNotNull(a); + Assert.assertNotNull(nonTestClass); + nonTestClass.a(); + } + +} \ No newline at end of file diff --git a/cdi-unit/pom.xml b/cdi-unit/pom.xml index 07063edf..a40faade 100644 --- a/cdi-unit/pom.xml +++ b/cdi-unit/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 cdi-unit @@ -36,7 +37,7 @@ org.jboss.weld.se weld-se-core compile - 2.1.2.Final + 2.2.0.Final @@ -102,6 +103,7 @@ 2.2.1 provided + diff --git a/pom.xml b/pom.xml index 1914301f..9074d821 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,7 @@ cdi-unit-tests-mockito cdi-unit-tests-easymock cdi-unit-tests-gradle + cdi-unit-tests-jandex