You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2014/10/14 19:32:52 UTC

svn commit: r1631829 - /tomee/tomee/trunk/container/openejb-core/src/test/java/org/apache/openejb/testing/AddInnerTest.java

Author: rmannibucau
Date: Tue Oct 14 17:32:52 2014
New Revision: 1631829

URL: http://svn.apache.org/r1631829
Log:
TOMEE-1411 create a finder from inner classes with app composer - adding the test

Added:
    tomee/tomee/trunk/container/openejb-core/src/test/java/org/apache/openejb/testing/AddInnerTest.java

Added: tomee/tomee/trunk/container/openejb-core/src/test/java/org/apache/openejb/testing/AddInnerTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/test/java/org/apache/openejb/testing/AddInnerTest.java?rev=1631829&view=auto
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/test/java/org/apache/openejb/testing/AddInnerTest.java (added)
+++ tomee/tomee/trunk/container/openejb-core/src/test/java/org/apache/openejb/testing/AddInnerTest.java Tue Oct 14 17:32:52 2014
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.openejb.testing;
+
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.junit.ApplicationComposer;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.inject.Inject;
+
+import static org.junit.Assert.assertNotNull;
+
+@RunWith(ApplicationComposer.class)
+public class AddInnerTest {
+    @Module
+    @Classes(innerClassesAsBean = true, cdi = true)
+    public WebApp web() {
+        return new WebApp();
+    }
+
+    @Inject
+    private Injectable notNull;
+
+    @Test
+    public void run() {
+        assertNotNull(notNull);
+    }
+
+    public static class Injectable {}
+}