summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-04-21 11:07:41 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-04-21 11:07:41 +0000
commitd5e70110c4bbffe76c6b7a934643d97f0c882583 (patch)
treed9092f045d4586ed83cbad4121cbddc0ca44f75b
parent272c01d1369e65413cc9b2b095dab8b6393bea62 (diff)
Start of a testcase which show implemntation.jee pointing at an ear is processed correctly
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@767113 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--branches/sca-java-1.x/modules/implementation-jee/src/test/java/org/apache/tuscany/sca/implementation/jee/xml/JeeTestCaseFIXME.java53
-rw-r--r--branches/sca-java-1.x/modules/implementation-jee/src/test/java/test/Helloworld.java25
-rw-r--r--branches/sca-java-1.x/modules/implementation-jee/src/test/java/test/MockImplementationProviderFactory.java44
-rw-r--r--branches/sca-java-1.x/modules/implementation-jee/src/test/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory19
-rw-r--r--branches/sca-java-1.x/modules/implementation-jee/src/test/resources/myarchive.earbin0 -> 21310 bytes
5 files changed, 141 insertions, 0 deletions
diff --git a/branches/sca-java-1.x/modules/implementation-jee/src/test/java/org/apache/tuscany/sca/implementation/jee/xml/JeeTestCaseFIXME.java b/branches/sca-java-1.x/modules/implementation-jee/src/test/java/org/apache/tuscany/sca/implementation/jee/xml/JeeTestCaseFIXME.java
new file mode 100644
index 0000000000..11f3f47a1f
--- /dev/null
+++ b/branches/sca-java-1.x/modules/implementation-jee/src/test/java/org/apache/tuscany/sca/implementation/jee/xml/JeeTestCaseFIXME.java
@@ -0,0 +1,53 @@
+/*
+ * 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.tuscany.sca.implementation.jee.xml;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import test.Helloworld;
+
+/**
+ */
+public class JeeTestCaseFIXME {
+
+
+ @Before
+ public void init() {
+ }
+
+ @Test
+ public void testSayHello() throws Exception {
+ SCADomain scaDomain = SCADomain.newInstance("http://localhost", "/", "org/apache/tuscany/sca/implementation/jee/xml/TestJEE.composite");
+
+ Helloworld service = scaDomain.getService(Helloworld.class, "TestJEE/HelloworldServiceBean_HelloworldService");
+
+ //assertEquals("hello beate", service.getGreetings("beate"));
+
+ scaDomain.close();
+ }
+
+ @After
+ public void end() {
+ }
+}
diff --git a/branches/sca-java-1.x/modules/implementation-jee/src/test/java/test/Helloworld.java b/branches/sca-java-1.x/modules/implementation-jee/src/test/java/test/Helloworld.java
new file mode 100644
index 0000000000..2cb6886b31
--- /dev/null
+++ b/branches/sca-java-1.x/modules/implementation-jee/src/test/java/test/Helloworld.java
@@ -0,0 +1,25 @@
+/*
+ * 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 test;
+
+public interface Helloworld {
+
+ String getGreetings(String name);
+}
diff --git a/branches/sca-java-1.x/modules/implementation-jee/src/test/java/test/MockImplementationProviderFactory.java b/branches/sca-java-1.x/modules/implementation-jee/src/test/java/test/MockImplementationProviderFactory.java
new file mode 100644
index 0000000000..5b9b2a890b
--- /dev/null
+++ b/branches/sca-java-1.x/modules/implementation-jee/src/test/java/test/MockImplementationProviderFactory.java
@@ -0,0 +1,44 @@
+/*
+ * 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 test;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.implementation.jee.JEEImplementation;
+import org.apache.tuscany.sca.provider.ImplementationProvider;
+import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+public class MockImplementationProviderFactory implements ImplementationProviderFactory<JEEImplementation>{
+
+ public MockImplementationProviderFactory(ExtensionPointRegistry extensionPoints) {
+
+ }
+
+
+ public ImplementationProvider createImplementationProvider(RuntimeComponent component,
+ JEEImplementation Implementation) {
+ return null;
+ }
+
+ public Class<JEEImplementation> getModelType() {
+ return null;
+ }
+
+}
diff --git a/branches/sca-java-1.x/modules/implementation-jee/src/test/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory b/branches/sca-java-1.x/modules/implementation-jee/src/test/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
new file mode 100644
index 0000000000..0a7205ab61
--- /dev/null
+++ b/branches/sca-java-1.x/modules/implementation-jee/src/test/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
@@ -0,0 +1,19 @@
+# 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.
+
+# Implementation class for the implementation extension
+test.MockImplementationProviderFactory;model=org.apache.tuscany.sca.implementation.jee.JEEImplementation
diff --git a/branches/sca-java-1.x/modules/implementation-jee/src/test/resources/myarchive.ear b/branches/sca-java-1.x/modules/implementation-jee/src/test/resources/myarchive.ear
new file mode 100644
index 0000000000..9fb1ed9d14
--- /dev/null
+++ b/branches/sca-java-1.x/modules/implementation-jee/src/test/resources/myarchive.ear
Binary files differ