diff options
Diffstat (limited to 'tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly')
11 files changed, 0 insertions, 456 deletions
diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/WebServiceAssemblyLoaderTestCase.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/WebServiceAssemblyLoaderTestCase.java deleted file mode 100644 index 6c8b58b0d1..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/WebServiceAssemblyLoaderTestCase.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests; - -import java.util.ArrayList; -import java.util.List; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.tuscany.binding.axis.assembly.WebServiceBinding; -import org.apache.tuscany.binding.axis.loader.WebServiceSCDLModelLoader; -import org.apache.tuscany.common.resource.ResourceLoader; -import org.apache.tuscany.common.resource.impl.ResourceLoaderImpl; -import org.apache.tuscany.model.assembly.AssemblyFactory; -import org.apache.tuscany.model.assembly.AssemblyModelContext; -import org.apache.tuscany.model.assembly.Binding; -import org.apache.tuscany.model.assembly.Component; -import org.apache.tuscany.model.assembly.EntryPoint; -import org.apache.tuscany.model.assembly.ExternalService; -import org.apache.tuscany.model.assembly.Module; -import org.apache.tuscany.model.assembly.impl.AssemblyFactoryImpl; -import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl; -import org.apache.tuscany.model.assembly.loader.AssemblyModelLoader; -import org.apache.tuscany.model.scdl.loader.SCDLModelLoader; -import org.apache.tuscany.model.scdl.loader.impl.SCDLAssemblyModelLoaderImpl; - -/** - */ -public class WebServiceAssemblyLoaderTestCase extends TestCase { - - /** - * - */ - public WebServiceAssemblyLoaderTestCase() { - super(); - } - - public void testLoader() { - - ResourceLoader resourceLoader=new ResourceLoaderImpl(Thread.currentThread().getContextClassLoader()); - WebServiceSCDLModelLoader wsLoader=new WebServiceSCDLModelLoader(); - List<SCDLModelLoader> scdlLoaders=new ArrayList<SCDLModelLoader>(); - scdlLoaders.add(wsLoader); - AssemblyModelLoader assemblyLoader=new SCDLAssemblyModelLoaderImpl(scdlLoaders); - AssemblyFactory assemblyFactory=new AssemblyFactoryImpl(); - AssemblyModelContext modelContext=new AssemblyModelContextImpl(assemblyFactory, assemblyLoader, resourceLoader); - - Module module = assemblyLoader.loadModule(getClass().getResource("sca.module").toString()); - module.initialize(modelContext); - - Assert.assertTrue(module.getName().equals("tuscany.binding.axis.assembly.tests.bigbank.account")); - - Component component = module.getComponent("AccountServiceComponent"); - Assert.assertTrue(component != null); - - EntryPoint entryPoint = module.getEntryPoint("AccountService"); - Assert.assertTrue(entryPoint != null); - - ExternalService externalService = module.getExternalService("StockQuoteService"); - Assert.assertTrue(externalService != null); - - Binding binding = externalService.getBindings().get(0); - Assert.assertTrue(binding instanceof WebServiceBinding); - } - - protected void setUp() throws Exception { - super.setUp(); - - Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); - } - -} diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountReport.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountReport.java deleted file mode 100644 index 6ac32e9c9a..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountReport.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.account; - -import java.util.List; - -/** - * @model - */ - -public interface AccountReport { - - /** - * @model type="services.account.AccountSummary" - */ - - List getAccountSummaries(); -} diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountService.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountService.java deleted file mode 100644 index 58f842878d..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountService.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.account; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface AccountService { - - public AccountReport getAccountReport(String customerID); -} diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java deleted file mode 100644 index 91fd5e0164..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.account; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -import org.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.accountdata.AccountDataService; -import org.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.stockquote.StockQuoteService; - -public class AccountServiceImpl implements AccountService { - - @Property - public String currency = "USD"; - - @Reference - public AccountDataService accountDataService; - @Reference - public StockQuoteService stockQuoteService; - - public AccountServiceImpl() { - } - - public AccountReport getAccountReport(String customerID) { - return null; - } - -} diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountSummary.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountSummary.java deleted file mode 100644 index 85825013a2..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/account/AccountSummary.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.account; - -/** - * @model - */ - -public interface AccountSummary { - - /** - * @model - */ - String getAccountNumber(); - - void setAccountNumber(String accountNumber); - - /** - * @model - */ - String getAccountType(); - - void setAccountType(String accountType); - - /** - * @model - */ - float getBalance(); - - void setBalance(float balance); -} - diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java deleted file mode 100644 index 4242d2fcc7..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.accountdata; - -public interface AccountDataService { - - CheckingAccount getCheckingAccount(String customerID); - - SavingsAccount getSavingsAccount(String customerID); - - StockAccount getStockAccount(String customerID); -} diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java deleted file mode 100644 index 66ae034d9a..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.accountdata; - -public class AccountDataServiceImpl implements AccountDataService { - - public CheckingAccount getCheckingAccount(String customerID) { - - CheckingAccount checkingAccount = new CheckingAccount(); - checkingAccount.setAccountNumber(customerID + "_" + "CHA12345"); - checkingAccount.setBalance(1500.0f); - - return checkingAccount; - } - - public SavingsAccount getSavingsAccount(String customerID) { - - SavingsAccount savingsAccount = new SavingsAccount(); - savingsAccount.setAccountNumber(customerID + "_" + "SAA12345"); - savingsAccount.setBalance(1500.0f); - - return savingsAccount; - } - - public StockAccount getStockAccount(String customerID) { - - StockAccount stockAccount = new StockAccount(); - stockAccount.setAccountNumber(customerID + "_" + "STA12345"); - stockAccount.setSymbol("IBM"); - stockAccount.setQuantity(100); - - return stockAccount; - } -} diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java deleted file mode 100644 index 6c48b7120a..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.accountdata; - -public class CheckingAccount { - - private String accountNumber; - private float balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - public float getBalance() { - return balance; - } - - public void setBalance(float balance) { - this.balance = balance; - } -} diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java deleted file mode 100644 index 718145feb5..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.accountdata; - -public class SavingsAccount { - - private String accountNumber; - private float balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - public float getBalance() { - return balance; - } - - public void setBalance(float balance) { - this.balance = balance; - } -} diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/StockAccount.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/StockAccount.java deleted file mode 100644 index 05f7644d80..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/accountdata/StockAccount.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.accountdata; - -public class StockAccount { - - private String accountNumber; - private String symbol; - private int quantity; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - public int getQuantity() { - return quantity; - } - - public void setQuantity(int quantity) { - this.quantity = quantity; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String symbol) { - this.symbol = symbol; - } -} diff --git a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java b/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java deleted file mode 100644 index a1c8f131a1..0000000000 --- a/tags/java-stable-20060304/sca/binding.axis/src/test/java/org/apache/tuscany/binding/axis/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * 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.apache.tuscany.binding.axis.assembly.tests.bigbank.account.services.stockquote; - -public interface StockQuoteService { - - public float getQuote(String symbol); -} - -
\ No newline at end of file |