diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-04 10:24:28 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-04 10:24:28 +0000 |
commit | 63dd7897c30b71fbee87546bb5c7fe75516599ac (patch) | |
tree | 6ee8fb976c5b617740094e81d20218233533e8be /java/sca/demos/mortgage-loanapproval/src/test | |
parent | 6c3797050830fef73e5a67b17e94e1b01a591318 (diff) |
Move demos to contrib
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@740674 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/demos/mortgage-loanapproval/src/test')
-rw-r--r-- | java/sca/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/java/sca/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java b/java/sca/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java deleted file mode 100644 index 285cc72515..0000000000 --- a/java/sca/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java +++ /dev/null @@ -1,56 +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 mortgage; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This shows how to test the Calculator service component. - */ -public class MortgageClientTestCase extends TestCase { - private SCADomain domain; - private LoanApproval loanApproval; - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("Mortgage.composite"); - loanApproval = domain.getService(LoanApproval.class, "LoanApprovalComponent"); - } - - @Override - protected void tearDown() throws Exception { - if (domain != null) { - domain.close(); - } - } - - public void testApprove() throws Exception { - Customer customer = new Customer(); - customer.setSsn("111-22-3333"); - customer.setFirstName("John"); - customer.setLastName("Smith"); - customer.setMonthlyIncome(5000.0d); - customer.setState("CA"); - - boolean approved = loanApproval.approve(customer, 200000d, 30); - System.out.println((approved ? "Approved: " : "Rejected: ") + customer); - } -} |