From cd843c59af26a3ffcccaf8dae167aec7d561088b Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 11 Aug 2008 09:05:00 +0000 Subject: Remove old RC tag git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@684682 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/callback/Callback1TestCase.java | 30 -- .../src/test/java/callback/Callback2TestCase.java | 29 -- .../src/test/java/callback/Callback3TestCase.java | 29 -- .../src/test/java/callback/CallbackTestCase.java | 50 ---- .../java/conversation/ConversationTestCase.java | 325 --------------------- .../helloworld/passbyref/PassByRefTestCase.java | 130 --------- .../src/test/java/helloworld/sdo/SdoTestCase.java | 95 ------ .../java/helloworld/ws/HelloWorldTestCase.java | 55 ---- .../test/java/supplychain/SupplyChainTestCase.java | 63 ---- .../supplychain/VersionedSupplyChainTestCase.java | 71 ----- .../supplychain/factory/DSFactoryTestCase.java | 32 -- .../java/supplychain/factory/FactoryTestCase.java | 72 ----- .../interfaces/DSInterfacesTestCase.java | 32 -- .../supplychain/interfaces/InterfacesTestCase.java | 32 -- .../properties/DSProperties2TestCase.java | 31 -- .../properties/DSPropertiesTestCase.java | 31 -- .../properties/Properties2TestCase.java | 69 ----- .../supplychain/properties/PropertiesTestCase.java | 58 ---- .../supplychain/services/DSServicesTestCase.java | 32 -- .../supplychain/services/ServicesTestCase.java | 32 -- .../supplychain/version/DSVersionTestCase.java | 33 --- .../java/supplychain/version/VersionTestCase.java | 33 --- .../java/supplychain/wiring/DSWiring1TestCase.java | 33 --- .../java/supplychain/wiring/DSWiring2TestCase.java | 33 --- .../java/supplychain/wiring/Wiring1TestCase.java | 32 -- .../java/supplychain/wiring/Wiring2TestCase.java | 32 -- .../src/test/java/test/OSGiTestCase.java | 67 ----- .../src/test/java/util/OSGiTestUtil.java | 71 ----- .../resources/osgi/felix/felix.config.properties | 45 --- 29 files changed, 1677 deletions(-) delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback1TestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback2TestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback3TestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/CallbackTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/conversation/ConversationTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/passbyref/PassByRefTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/sdo/SdoTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/ws/HelloWorldTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/SupplyChainTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/VersionedSupplyChainTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/factory/DSFactoryTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/factory/FactoryTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/interfaces/DSInterfacesTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/interfaces/InterfacesTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/DSProperties2TestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/DSPropertiesTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/Properties2TestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/PropertiesTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/services/DSServicesTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/services/ServicesTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/version/DSVersionTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/version/VersionTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring1TestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring2TestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring1TestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring2TestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/test/OSGiTestCase.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java delete mode 100644 tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/resources/osgi/felix/felix.config.properties (limited to 'tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test') diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback1TestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback1TestCase.java deleted file mode 100644 index 54b9b00bc8..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback1TestCase.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 callback; - - -public class Callback1TestCase extends CallbackTestCase { - - public Callback1TestCase() { - super("callback-test1.composite"); - } - - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback2TestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback2TestCase.java deleted file mode 100644 index b26bfbd98d..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback2TestCase.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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 callback; - - -public class Callback2TestCase extends CallbackTestCase { - - public Callback2TestCase() { - super("callback-test2.composite"); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback3TestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback3TestCase.java deleted file mode 100644 index 667df7aa12..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/Callback3TestCase.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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 callback; - - -public class Callback3TestCase extends CallbackTestCase { - - public Callback3TestCase() { - super("callback-test3.composite"); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/CallbackTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/CallbackTestCase.java deleted file mode 100644 index a95437f8c1..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/callback/CallbackTestCase.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 callback; - - -import callback.client.CallbackClient; - -import test.OSGiTestCase; - -public abstract class CallbackTestCase extends OSGiTestCase { - - private CallbackClient aCallbackClient; - - protected String compositeName; - - - public CallbackTestCase(String compositeName) { - super(compositeName, "callback"); - } - - - - protected void setUp() throws Exception { - super.setUp(); - aCallbackClient = scaDomain.getService(CallbackClient.class, "CallbackClient"); - } - - - public void test() throws Exception { - aCallbackClient.run(); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/conversation/ConversationTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/conversation/ConversationTestCase.java deleted file mode 100644 index c5d94df93d..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/conversation/ConversationTestCase.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * 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 conversation; - -import junit.framework.Assert; - -import org.junit.Before; -import org.junit.Test; - -import conversation.client.ConversationalClient; - -import test.OSGiTestCase; - -public class ConversationTestCase extends OSGiTestCase { - - private ConversationalClient conversationalStatelessClientStatelessService; - private ConversationalClient conversationalStatelessClientStatefulService; - private ConversationalClient conversationalStatefulClientStatelessService; - private ConversationalClient conversationalStatefulClientStatefulService; - - public ConversationTestCase() { - super("conversation-test.composite", "conversation"); - } - - @Before - public void setUp() throws Exception { - - try { - - super.setUp(); - - conversationalStatelessClientStatelessService = scaDomain.getService(ConversationalClient.class, - "ConversationalStatelessClientStatelessService/ConversationalClient"); - - conversationalStatelessClientStatefulService = scaDomain.getService(ConversationalClient.class, - "ConversationalStatelessClientStatefulService/ConversationalClient"); - - conversationalStatefulClientStatelessService = scaDomain.getService(ConversationalClient.class, - "ConversationalStatefulClientStatelessService/ConversationalClient"); - - conversationalStatefulClientStatefulService = scaDomain.getService(ConversationalClient.class, - "ConversationalStatefulClientStatefulService/ConversationalClient"); - - - - } catch (Exception e) { - e.printStackTrace(); - - throw e; - } - - } - - - // stateless client stateful service tests - // ======================================= - @Test - public void testStatelessStatefulConversationFromInjectedReference() { - int count = conversationalStatelessClientStatefulService.runConversationFromInjectedReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatefulConversationFromServiceReference() { - int count = conversationalStatelessClientStatefulService.runConversationFromServiceReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatefulConversationWithUserDefinedConversationId() { - int count = conversationalStatelessClientStatefulService.runConversationWithUserDefinedConversationId(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatefulConversationCheckUserDefinedConversationId() { - String conversationId = conversationalStatelessClientStatefulService.runConversationCheckUserDefinedConversationId(); - Assert.assertEquals("MyConversation2", conversationId); - } - - @Test - public void testStatelessStatefulConversationCheckingScope() { - conversationalStatelessClientStatefulService.runConversationCheckingScope(); - - Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,init,", - conversationalStatelessClientStatefulService.getServiceCalls()); - } - - @Test - public void testStatelessStatefulConversationWithCallback() { - int count = conversationalStatelessClientStatefulService.runConversationWithCallback(); - Assert.assertEquals(0, count); - - Assert.assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,init,", - conversationalStatelessClientStatefulService.getCalls()); - } - - /////@Test - public void _testStatelessStatefulConversationHavingPassedReference() { - int count = conversationalStatelessClientStatefulService.runConversationHavingPassedReference(); - Assert.assertEquals(3, count); - } - - @Test - public void testStatelessStatefulConversationBusinessException() { - String message = conversationalStatelessClientStatefulService.runConversationBusinessException(); - Assert.assertEquals("Business Exception", message); - } - - @Test - public void testStatelessStatefulConversationBusinessExceptionCallback() { - String message = conversationalStatelessClientStatefulService.runConversationBusinessExceptionCallback(); - Assert.assertEquals("Business Exception", message); - } - - @Test - public void testStatelessStatefulConversationCallingEndedConversation() { - int count = conversationalStatelessClientStatefulService.runConversationCallingEndedConversation(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatelessStatefulConversationCallingEndedConversationCallback() { - int count = conversationalStatelessClientStatefulService.runConversationCallingEndedConversationCallback(); - Assert.assertEquals(0, count); - } - - // stateless client stateless service tests - // ======================================== - @Test - public void testStatelessStatelessConversationFromInjectedReference() { - int count = conversationalStatelessClientStatelessService.runConversationFromInjectedReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatelessConversationFromServiceReference() { - int count = conversationalStatelessClientStatelessService.runConversationFromServiceReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatelessConversationWithUserDefinedConversationId() { - int count = conversationalStatelessClientStatelessService.runConversationWithUserDefinedConversationId(); - Assert.assertEquals(2, count); - } - @Test - public void testStatelessStatelessConversationCheckUserDefinedConversationId() { - String conversationId = conversationalStatelessClientStatelessService.runConversationCheckUserDefinedConversationId(); - Assert.assertEquals("MyConversation2", conversationId); - } - - @Test - public void testStatelessStatelessConversationCheckingScope() { - conversationalStatelessClientStatelessService.runConversationCheckingScope(); - Assert.assertEquals("init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,init,", - conversationalStatelessClientStatelessService.getServiceCalls()); - } - - @Test - public void testStatelessStatelessConversationWithCallback() { - int count = conversationalStatelessClientStatelessService.runConversationWithCallback(); - Assert.assertEquals(0, count); - - Assert.assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,init,", - conversationalStatelessClientStatelessService.getCalls()); - } - /////@Test - public void _testStatelessStatelessConversationHavingPassedReference() { - int count = conversationalStatelessClientStatelessService.runConversationHavingPassedReference(); - Assert.assertEquals(3, count); - } - - @Test - public void testStatelessStatelessConversationCallingEndedConversation() { - int count = conversationalStatelessClientStatelessService.runConversationCallingEndedConversation(); - Assert.assertEquals(-999, count); - } - - @Test - public void testStatelessStatelessConversationCallingEndedConversationCallback() { - int count = conversationalStatelessClientStatelessService.runConversationCallingEndedConversationCallback(); - Assert.assertEquals(0, count); - } - - // stateful client stateful service tests - // ====================================== - @Test - public void testStatefulStatefulConversationFromInjectedReference() { - int count = conversationalStatefulClientStatefulService.runConversationFromInjectedReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatefulConversationFromServiceReference() { - int count = conversationalStatefulClientStatefulService.runConversationFromServiceReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatefulConversationWithUserDefinedConversationId() { - int count = conversationalStatefulClientStatefulService.runConversationWithUserDefinedConversationId(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatefulConversationCheckUserDefinedConversationId() { - String conversationId = conversationalStatefulClientStatefulService.runConversationCheckUserDefinedConversationId(); - Assert.assertEquals("MyConversation2", conversationId); - } - - @Test - public void testStatefulStatefulConversationCheckingScope() { - conversationalStatefulClientStatefulService.runConversationCheckingScope(); - Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,init,", - conversationalStatefulClientStatefulService.getServiceCalls()); - } - - @Test - public void testStatefulStatefulConversationWithCallback() { - int count = conversationalStatefulClientStatefulService.runConversationWithCallback(); - //System.out.println("Calls: " + conversationalStatefulClientStatefulService.getCalls()); - Assert.assertEquals(4, count); - - Assert.assertEquals("init,runConversationWithCallback,initializeCount,incrementCount,retrieveCount,endConversation,destroy,init,", - conversationalStatefulClientStatefulService.getCalls()); - } - - /////@Test - public void _testStatefulStatefulConversationHavingPassedReference() { - int count = conversationalStatefulClientStatefulService.runConversationHavingPassedReference(); - Assert.assertEquals(3, count); - } - - @Test - public void testStatefulStatefulConversationCallingEndedConversation() { - int count = conversationalStatefulClientStatefulService.runConversationCallingEndedConversation(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatefulStatefulConversationCallingEndedConversationCallback() { - int count = conversationalStatefulClientStatefulService.runConversationCallingEndedConversationCallback(); - Assert.assertEquals(0, count); - } - - // stateful client stateless service tests - // ======================================= - @Test - public void testStatefulStatelessConversationFromInjectedReference() { - int count = conversationalStatefulClientStatelessService.runConversationFromInjectedReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatelessConversationFromServiceReference() { - int count = conversationalStatefulClientStatelessService.runConversationFromServiceReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatelessConversationWithUserDefinedConversationId() { - int count = conversationalStatefulClientStatelessService.runConversationWithUserDefinedConversationId(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatelessConversationCheckUserDefinedConversationId() { - String conversationId = conversationalStatefulClientStatelessService.runConversationCheckUserDefinedConversationId(); - Assert.assertEquals("MyConversation2", conversationId); - } - - @Test - public void testStatefulStatelessConversationCheckingScope() { - conversationalStatefulClientStatelessService.runConversationCheckingScope(); - - Assert.assertEquals("init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,init,", - conversationalStatefulClientStatelessService.getServiceCalls()); - } - - @Test - public void testStatefulStatelessConversationWithCallback() { - int count = conversationalStatefulClientStatelessService.runConversationWithCallback(); - Assert.assertEquals(4, count); - - Assert.assertEquals("init,runConversationWithCallback,initializeCount,incrementCount,retrieveCount,endConversation,destroy,init,", - conversationalStatefulClientStatelessService.getCalls()); - } - - /////@Test - public void _testStatefulStatelessConversationHavingPassedReference() { - int count = conversationalStatefulClientStatelessService.runConversationHavingPassedReference(); - Assert.assertEquals(3, count); - } - - @Test - public void testStatefulStatelessConversationCallingEndedConversation() { - int count = conversationalStatefulClientStatelessService.runConversationCallingEndedConversation(); - Assert.assertEquals(-999, count); - } - - @Test - public void testStatefulStatelessConversationCallingEndedConversationCallback() { - int count = conversationalStatefulClientStatelessService.runConversationCallingEndedConversationCallback(); - Assert.assertEquals(0, count); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/passbyref/PassByRefTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/passbyref/PassByRefTestCase.java deleted file mode 100644 index d340923938..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/passbyref/PassByRefTestCase.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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 helloworld.passbyref; - -import helloworld.Greetings; -import test.OSGiTestCase; - - -public class PassByRefTestCase extends OSGiTestCase { - - private Greetings greetingsJava; - private Greetings greetingsOSGi; - private String[] origNames = {"world"}; - private String[] names; - - public PassByRefTestCase() { - super("passbyref-test.composite", "passbyref"); - } - - protected void setUp() throws Exception { - - super.setUp(); - greetingsJava = scaDomain.getService(Greetings.class, "JavaGreetingsComponent"); - greetingsOSGi = scaDomain.getService(Greetings.class, "OSGiGreetingsComponent"); - - names = new String[origNames.length]; - System.arraycopy(origNames, 0, names, 0, names.length); - } - - - public void test() throws Exception { - - javaOSGiPassByValue(); - osgiJavaPassByValue(); - javaOSGiPassByRef(); - osgiJavaPassByRef(); - - } - - - public void javaOSGiPassByValue() throws Exception { - - String[] greetings = greetingsJava.getGreetingsFromJava(names); - for (int i = 0; i < origNames.length; i++) { - assertEquals(origNames[i], names[i]); - } - for (int i = 0; i < origNames.length; i++) { - - System.out.println(greetings[i]); - - assertEquals(greetings[i], - "Hello " + origNames[i] + "(From Java)(From OSGi)"); - } - - } - - public void osgiJavaPassByValue() throws Exception { - String[] names = { - "world" - }; - String[] greetings = greetingsOSGi.getGreetingsFromOSGi(names); - - for (int i = 0; i < origNames.length; i++) { - assertEquals(origNames[i], names[i]); - } - for (int i = 0; i < origNames.length; i++) { - - System.out.println(greetings[i]); - - assertEquals(greetings[i], - "Hello " + origNames[i] + "(From OSGi)(From Java)"); - } - - - - } - - public void javaOSGiPassByRef() throws Exception { - String[] names = { - "world" - }; - String[] greetings = greetingsJava.getModifiedGreetingsFromJava(names); - for (int i = 0; i < origNames.length; i++) { - assertEquals("Hello " + origNames[i] + "(From Java)(From OSGi)", names[i]); - } - for (int i = 0; i < origNames.length; i++) { - - System.out.println(greetings[i]); - - assertEquals(greetings[i], - "Hello " + origNames[i] + "(From Java)(From OSGi)"); - } - } - - public void osgiJavaPassByRef() throws Exception { - String[] names = { - "world" - }; - String[] greetings = greetingsOSGi.getModifiedGreetingsFromOSGi(names); - for (int i = 0; i < origNames.length; i++) { - assertEquals("Hello " + origNames[i] + "(From OSGi)(From Java)", names[i]); - } - for (int i = 0; i < origNames.length; i++) { - - System.out.println(greetings[i]); - - assertEquals(greetings[i], - "Hello " + origNames[i] + "(From OSGi)(From Java)"); - } - } - - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/sdo/SdoTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/sdo/SdoTestCase.java deleted file mode 100644 index c1f11d0b6e..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/sdo/SdoTestCase.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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 helloworld.sdo; - -import helloworld.sdo.client.HelloWorldClient; - -import java.io.File; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -import util.OSGiTestUtil; - - -public class SdoTestCase extends TestCase { - - - private EmbeddedSCADomain scaDomain; - - - protected void setUp() throws Exception { - - OSGiTestUtil.setUpOSGiTestRuntime(); - - scaDomain = new EmbeddedSCADomain(this.getClass().getClassLoader(), "http://localhost"); - scaDomain.start(); - ContributionService contributionService = scaDomain.getContributionService(); - - URL serviceURL = new File("./target/classes/sdo/ds/HelloWorldService.jar").toURI().toURL(); - URL clientURL = new File("./target/classes/sdo/ds/HelloWorldClient.jar").toURI().toURL(); - - Contribution serviceContribution = contributionService.contribute("HelloWorldService", serviceURL, true); - Contribution clientContribution = contributionService.contribute("HelloWorldClient", clientURL, true); - - for (Composite deployable : serviceContribution.getDeployables()) { - scaDomain.getDomainComposite().getIncludes().add(deployable); - scaDomain.buildComposite(deployable); - } - for (Composite deployable : clientContribution.getDeployables()) { - scaDomain.getDomainComposite().getIncludes().add(deployable); - scaDomain.buildComposite(deployable); - } - for (Composite deployable : clientContribution.getDeployables() ) { - scaDomain.getCompositeActivator().activate(deployable); - scaDomain.getCompositeActivator().start(deployable); - } - } - - protected void tearDown() throws Exception { - scaDomain.close(); - - OSGiTestUtil.shutdownOSGiRuntime(); - } - - - public void testJavaToOSGi() throws Exception { - - HelloWorldClient helloWorldClient = scaDomain.getService(HelloWorldClient.class, "JavaHelloWorldClientComponent"); - String greetings = helloWorldClient.getGreetings("Apache", "Tuscany"); - System.out.println(greetings); - assertEquals("Hello Apache Tuscany", greetings); - } - - public void testOSGiToJava() throws Exception { - - HelloWorldClient helloWorldClient = scaDomain.getService(HelloWorldClient.class, "OSGiHelloWorldClientComponent"); - String greetings = helloWorldClient.getGreetings("Apache", "Tuscany"); - System.out.println(greetings); - assertEquals("Hello Apache Tuscany", greetings); - } - - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/ws/HelloWorldTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/ws/HelloWorldTestCase.java deleted file mode 100644 index 49afb3d8e8..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/helloworld/ws/HelloWorldTestCase.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 helloworld.ws; - -import helloworld.HelloWorld; - - -import test.OSGiTestCase; -import util.OSGiTestUtil; - - -public class HelloWorldTestCase extends OSGiTestCase { - - private HelloWorld helloWorld; - - public HelloWorldTestCase() { - super("ws-helloworld.composite", "ws"); - } - - protected void setUp() throws Exception { - super.setUp(); - helloWorld = scaDomain.getService(HelloWorld.class, "HelloWorldComponent"); - } - - protected void tearDown() throws Exception { - scaDomain.close(); - OSGiTestUtil.shutdownOSGiRuntime(); - } - - - public void testHelloWorld() throws Exception { - String greetings = helloWorld.getGreetings("petra"); - System.out.println(greetings); - assertEquals("Hello petra", greetings); - } - - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/SupplyChainTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/SupplyChainTestCase.java deleted file mode 100644 index a858c18a90..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/SupplyChainTestCase.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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 supplychain; - -import supplychain.customer.Customer; -import test.OSGiTestCase; - -/** - * Test case for supplychain - it is invoked with different composite files to test - * various scenarios. - */ -public abstract class SupplyChainTestCase extends OSGiTestCase { - - public Customer customer; - - - public SupplyChainTestCase(String compositeName, String contributionLocation) { - super(compositeName, contributionLocation); - } - - protected void setUp() throws Exception { - - super.setUp(); - customer = scaDomain.getService(Customer.class, "CustomerComponent"); - } - - public void test() throws Exception { - - System.out.println("Main thread " + Thread.currentThread()); - customer.purchaseBooks(); - customer.purchaseGames(); - long timeout = 5000L; - while (timeout > 0) { - if (customer.hasOutstandingOrders()) { - Thread.sleep(100); - timeout -= 100; - } else - break; - } - assertFalse(customer.hasOutstandingOrders()); - - System.out.println("Test complete"); - - } - - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/VersionedSupplyChainTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/VersionedSupplyChainTestCase.java deleted file mode 100644 index a9941aebcd..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/VersionedSupplyChainTestCase.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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 supplychain; - -import supplychain.customer.Customer; -import test.OSGiTestCase; - -/** - * OSGi test program - common code for versioned bundles - */ -public abstract class VersionedSupplyChainTestCase extends OSGiTestCase { - - private Customer customer1; - private Customer customer2; - - - public VersionedSupplyChainTestCase(String compositeName, String contributionLocation) { - super(compositeName, contributionLocation); - } - - protected void setUp() throws Exception { - - super.setUp(); - customer1 = scaDomain.getService(Customer.class, "CustomerComponent1"); - customer2 = scaDomain.getService(Customer.class, "CustomerComponent2"); - } - - protected void tearDown() throws Exception { - super.tearDown(); - Thread.sleep(2000); - } - - public void test() throws Exception { - - System.out.println("Main thread " + Thread.currentThread()); - customer1.purchaseBooks(); - customer2.purchaseGames(); - long timeout = 5000L; - while (timeout > 0) { - if (customer1.hasOutstandingOrders()) { - Thread.sleep(100); - timeout -= 100; - } else if (customer2.hasOutstandingOrders()) { - Thread.sleep(100); - timeout -= 100; - } else - break; - } - assertFalse(customer1.hasOutstandingOrders()); - assertFalse(customer2.hasOutstandingOrders()); - - System.out.println("Test complete"); - - } -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/factory/DSFactoryTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/factory/DSFactoryTestCase.java deleted file mode 100644 index 8e939b1a83..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/factory/DSFactoryTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 supplychain.factory; - - -/** - * OSGi test program - declarative with scopes other than composites which use OSGi service factories - */ -public class DSFactoryTestCase extends FactoryTestCase { - - public DSFactoryTestCase() { - super("factory-ds-test.composite", "factory/ds"); - } - - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/factory/FactoryTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/factory/FactoryTestCase.java deleted file mode 100644 index 39d90bb75c..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/factory/FactoryTestCase.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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 supplychain.factory; - -import supplychain.SupplyChainTestCase; - -/** - * OSGi test program - declarative with scopes other than composites which use OSGi service factories - */ -public class FactoryTestCase extends SupplyChainTestCase { - /** - * This constant defines the time period (in milliseconds) for which we are prepared to wait for - * the @OneWay notifyShipment() callback to run. - */ - private static final long MAX_WAIT_TIME_FOR_CALLBACK = 10000; - - public FactoryTestCase() { - super("factory-test.composite", "factory"); - } - - protected FactoryTestCase(String compositeName, String contributionLocation) { - super(compositeName, contributionLocation); - } - - - @Override - public void test() throws Exception { - - System.out.println("Main thread " + Thread.currentThread()); - customer.purchaseBooks(); - waitForOrderShipmentNotification(); // TUSCANY-2198 notifyShipment() callback is @OneWay - assertFalse(customer.hasOutstandingOrders()); - - customer.purchaseGames(); - waitForOrderShipmentNotification(); // TUSCANY-2198 notifyShipment() callback is @OneWay - assertFalse(customer.hasOutstandingOrders()); - - Thread.sleep(2000); - System.out.println("Test complete"); - - } - - /** - * Since the notifyShipment() callback on the Customer is @OneWay, we need to allow - * some time for it to complete as it is runs asynchronously. - * - * This is for TUSCANY-2198 - */ - private void waitForOrderShipmentNotification() throws InterruptedException { - long startTime = System.currentTimeMillis(); - while (customer.hasOutstandingOrders() - && System.currentTimeMillis() - startTime < MAX_WAIT_TIME_FOR_CALLBACK) { - Thread.sleep(100); - } - } -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/interfaces/DSInterfacesTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/interfaces/DSInterfacesTestCase.java deleted file mode 100644 index 5376687b61..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/interfaces/DSInterfacesTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 supplychain.interfaces; - -import supplychain.SupplyChainTestCase; - -/** - * OSGi test program - declarative with components exposing multiple services with multiple interfaces - */ -public class DSInterfacesTestCase extends SupplyChainTestCase { - - public DSInterfacesTestCase() { - super("interfaces-ds-test.composite", "interfaces/ds"); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/interfaces/InterfacesTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/interfaces/InterfacesTestCase.java deleted file mode 100644 index 6d8dc1021e..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/interfaces/InterfacesTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 supplychain.interfaces; - -import supplychain.SupplyChainTestCase; - -/** - * OSGi test program - procedural with components exposing multiple services with multiple interfaces - */ -public class InterfacesTestCase extends SupplyChainTestCase { - - public InterfacesTestCase() { - super("interfaces-test.composite", "interfaces"); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/DSProperties2TestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/DSProperties2TestCase.java deleted file mode 100644 index e037ae9675..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/DSProperties2TestCase.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 supplychain.properties; - - -/** - * OSGi test program - declarative with business properties - */ -public class DSProperties2TestCase extends Properties2TestCase { - - public DSProperties2TestCase() { - super("properties2-ds-test.composite", "properties/ds"); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/DSPropertiesTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/DSPropertiesTestCase.java deleted file mode 100644 index eecf67913d..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/DSPropertiesTestCase.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 supplychain.properties; - - -/** - * OSGi test program - declarative with business properties - */ -public class DSPropertiesTestCase extends PropertiesTestCase { - - public DSPropertiesTestCase() { - super("properties-ds-test.composite", "properties/ds"); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/Properties2TestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/Properties2TestCase.java deleted file mode 100644 index 203bf5123c..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/Properties2TestCase.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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 supplychain.properties; - - -import stockquote.StockQuote; -import test.OSGiTestCase; - -/** - * OSGi test program - procedural with business properties - */ -public class Properties2TestCase extends OSGiTestCase { - - - private StockQuote stockQuoteServiceUSD; - private StockQuote stockQuoteServiceEURO; - - public Properties2TestCase() { - super("properties2-test.composite", "properties"); - } - - protected Properties2TestCase(String compositeName, String contributionLocation) { - super(compositeName, contributionLocation); - } - - protected void setUp() throws Exception { - - super.setUp(); - stockQuoteServiceUSD = scaDomain.getService(StockQuote.class, "USDStockQuoteComponent"); - stockQuoteServiceEURO = scaDomain.getService(StockQuote.class, "EUROStockQuoteComponent"); - } - - public void test() throws Exception { - - double stockQuote = stockQuoteServiceUSD.getQuote("IBM"); - - double expectedValue = 52.81 * 2.0; - - System.out.println("IBM: $" + stockQuote); - - assertTrue(stockQuote > expectedValue - 0.1 && stockQuote < expectedValue + 0.1); - - double stockQuote2 = stockQuoteServiceEURO.getQuote("IBM"); - - double expectedValue2 = 52.81 * 1.48; - - System.out.println("IBM: Euro " + stockQuote2); - - assertTrue(stockQuote2 > expectedValue2 - 0.1 && stockQuote2 < expectedValue2 + 0.1); - - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/PropertiesTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/PropertiesTestCase.java deleted file mode 100644 index 429b1f10ef..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/properties/PropertiesTestCase.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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 supplychain.properties; - -import stockquote.StockQuote; -import test.OSGiTestCase; - -/** - * OSGi test program - procedural with business properties - */ -public class PropertiesTestCase extends OSGiTestCase { - - - private StockQuote stockQuoteService; - - public PropertiesTestCase() { - super("properties-test.composite", "properties"); - } - - protected PropertiesTestCase(String compositeName, String contributionLocation) { - super(compositeName, contributionLocation); - } - - protected void setUp() throws Exception { - super.setUp(); - stockQuoteService = scaDomain.getService(StockQuote.class, "StockQuoteComponent"); - } - - - public void test() throws Exception { - - double stockQuote = stockQuoteService.getQuote("IBM"); - - double expectedValue = 52.81 * 2.0; - - System.out.println("IBM: " + stockQuote); - - assertTrue(stockQuote > expectedValue - 0.1 && stockQuote < expectedValue + 0.1); - - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/services/DSServicesTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/services/DSServicesTestCase.java deleted file mode 100644 index dbc980f8c4..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/services/DSServicesTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 supplychain.services; - -import supplychain.SupplyChainTestCase; - -/** - * OSGi test program - declarative with components exposing multiple services - */ -public class DSServicesTestCase extends SupplyChainTestCase { - - public DSServicesTestCase() { - super("services-ds-test.composite", "services/ds"); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/services/ServicesTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/services/ServicesTestCase.java deleted file mode 100644 index e39295a402..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/services/ServicesTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 supplychain.services; - -import supplychain.SupplyChainTestCase; - -/** - * OSGi test program - procedural with components exposing multiple services - */ -public class ServicesTestCase extends SupplyChainTestCase { - - public ServicesTestCase() { - super("services-test.composite", "services"); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/version/DSVersionTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/version/DSVersionTestCase.java deleted file mode 100644 index c2f6bff4f5..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/version/DSVersionTestCase.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 supplychain.version; - -import supplychain.VersionedSupplyChainTestCase; - -/** - * OSGi test program - declarative with versioning - */ -public class DSVersionTestCase extends VersionedSupplyChainTestCase { - - public DSVersionTestCase() { - super("version-ds-test.composite", "version/ds"); - } - - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/version/VersionTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/version/VersionTestCase.java deleted file mode 100644 index 17ba7a2f14..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/version/VersionTestCase.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 supplychain.version; - -import supplychain.VersionedSupplyChainTestCase; - -/** - * OSGi test program - procedural with versioning - */ -public class VersionTestCase extends VersionedSupplyChainTestCase { - - public VersionTestCase() { - super("version-test.composite", "version"); - } - - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring1TestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring1TestCase.java deleted file mode 100644 index 8c33720018..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring1TestCase.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 supplychain.wiring; - -import supplychain.SupplyChainTestCase; - -/** - * OSGi test program - declarative with SCA wiring - */ -public class DSWiring1TestCase extends SupplyChainTestCase { - - public DSWiring1TestCase() { - super("wiring-ds-test1.composite", "wiring/ds"); - } - - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring2TestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring2TestCase.java deleted file mode 100644 index 0c6edd6691..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring2TestCase.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 supplychain.wiring; - -import supplychain.SupplyChainTestCase; - -/** - * OSGi test program - declarative with SCA wiring - */ -public class DSWiring2TestCase extends SupplyChainTestCase { - - public DSWiring2TestCase() { - super("wiring-ds-test2.composite", "wiring/ds"); - } - - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring1TestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring1TestCase.java deleted file mode 100644 index 0b48ac90ba..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring1TestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 supplychain.wiring; - -import supplychain.SupplyChainTestCase; - -/** - * OSGi test program - procedural with SCA wiring - */ -public class Wiring1TestCase extends SupplyChainTestCase { - - public Wiring1TestCase() { - super("wiring-test1.composite", "wiring"); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring2TestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring2TestCase.java deleted file mode 100644 index c84741f34f..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring2TestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 supplychain.wiring; - -import supplychain.SupplyChainTestCase; - -/** - * OSGi test program - procedural with SCA wiring - */ -public class Wiring2TestCase extends SupplyChainTestCase { - - public Wiring2TestCase() { - super("wiring-test2.composite", "wiring"); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/test/OSGiTestCase.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/test/OSGiTestCase.java deleted file mode 100644 index 5a9b2a8b1d..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/test/OSGiTestCase.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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 java.io.File; -import java.net.MalformedURLException; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import util.OSGiTestUtil; - -/** - * Test case setup base code - it is invoked with different composite files to test - * various scenarios. - */ -public abstract class OSGiTestCase extends TestCase { - - private String compositeName; - private String contributionLocation; - public SCADomain scaDomain; - - public OSGiTestCase(String compositeName, String contributionLocation) { - super(); - this.compositeName = compositeName; - this.contributionLocation = contributionLocation; - try { - if (contributionLocation != null) { - File f = new File("target/classes/" + contributionLocation); - this.contributionLocation = f.toURL().toString(); - } - } catch (MalformedURLException e) { - e.printStackTrace(); - } - } - - protected void setUp() throws Exception { - - OSGiTestUtil.setUpOSGiTestRuntime(); - - scaDomain = SCADomain.newInstance("http://localhost", contributionLocation, compositeName); - } - - protected void tearDown() throws Exception { - scaDomain.close(); - - OSGiTestUtil.shutdownOSGiRuntime(); - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java deleted file mode 100644 index 7b95c12038..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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 util; - -import org.apache.tuscany.sca.osgi.runtime.OSGiRuntime; - - -/** - * OSGi Test Utils - */ -public class OSGiTestUtil { - - public static void setUpOSGiTestRuntime() throws Exception { - - setUpFelixTestRuntime(); - } - - - private static void setUpFelixTestRuntime() throws Exception { - - String felixConfigFileName = "file:target/test-classes/osgi/felix/felix.config.properties"; - - System.setProperty("felix.config.properties", felixConfigFileName); - - try { - - ClassLoader cl = OSGiTestUtil.class.getClassLoader(); - - Class felixMainClass = cl.loadClass("org.apache.felix.main.Main"); - if (felixMainClass != null) { - String felixDir = felixMainClass.getProtectionDomain().getCodeSource().getLocation().getPath(); - int index = 0; - if ((index = felixDir.indexOf("/org.apache.felix.main")) >= 0) { - felixDir = felixDir.substring(0, index); - System.setProperty("FELIX_DIR", felixDir); - } - } - - } catch (Exception e) { - // Ignore - } - - - } - - public static void shutdownOSGiRuntime() { - try { - OSGiRuntime.stop(); - - } catch (Exception e) { - // Ignore - } - } - -} diff --git a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/resources/osgi/felix/felix.config.properties b/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/resources/osgi/felix/felix.config.properties deleted file mode 100644 index 8399991503..0000000000 --- a/tags/java/sca/1.3-RC1a/itest/osgi-implementation/src/test/resources/osgi/felix/felix.config.properties +++ /dev/null @@ -1,45 +0,0 @@ -# -# 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. -# -# -# Framework config properties. -# -org.osgi.framework.system.packages=org.osgi.framework; version=1.3.0, \ - org.osgi.service.packageadmin; version=1.2.0, \ - org.osgi.service.startlevel; version=1.0.0, \ - org.osgi.service.url; version=1.0.0 \ - org.osgi.util.tracker; version=1.3.2 - - -felix.auto.start.1= \ - "file://${FELIX_DIR}/org.apache.felix.scr/1.0.2/org.apache.felix.scr-1.0.2.jar" \ - "file://${FELIX_DIR}/org.apache.felix.configadmin/1.0.1/org.apache.felix.configadmin-1.0.1.jar" - - -# "file://${FELIX_DIR}/org.apache.felix.shell/1.0.1/org.apache.felix.shell-1.0.1.jar" \ -# "file://${FELIX_DIR}/org.apache.felix.shell.tui/1.0.1/org.apache.felix.shell.tui-1.0.1.jar" \ -# "file://${FELIX_DIR}/org.apache.felix.bundlerepository/1.0.3/org.apache.felix.bundlerepository-1.0.3.jar" \ - -felix.startlevel.framework=1 -felix.startlevel.bundle=1 - -# -# Bundle config properties. -# -org.osgi.service.http.port=8080 -obr.shell.telnet=on -- cgit v1.2.3