summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-11-05 21:14:49 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-11-05 21:14:49 +0000
commit8c049462ff6387d8c3f69f4e42a4c4b36e38a90c (patch)
tree3e6b1ec1ab2e2a724d9228ca55052394c3034060 /sandbox/travelsample/contributions/creditcard-payment-jaxb-policy
parent68c3920fc0ba41c6a9ebf062bd41e5ebf647e51b (diff)
Format the code
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@833174 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample/contributions/creditcard-payment-jaxb-policy')
-rw-r--r--sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java20
-rw-r--r--sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java30
2 files changed, 25 insertions, 25 deletions
diff --git a/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java b/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java
index 253fcbe674..293f08453f 100644
--- a/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java
+++ b/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/java/com/tuscanyscatours/payment/creditcard/impl/CreditCardPaymentImpl.java
@@ -19,28 +19,28 @@
package com.tuscanyscatours.payment.creditcard.impl;
+import org.osoa.sca.annotations.Service;
+
import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType;
import com.tuscanyscatours.payment.creditcard.CreditCardPayment;
-import org.osoa.sca.annotations.Service;
/**
*
*/
@Service(CreditCardPayment.class)
public class CreditCardPaymentImpl implements CreditCardPayment {
-
+
public String authorize(CreditCardDetailsType creditCard, float amount) {
- if (creditCard != null){
- System.out.println("Checking card: name = " +
- creditCard.getCardOwner().getName() +
- " number = " +
- creditCard.getCreditCardNumber() +
- " for amount " +
- amount);
+ if (creditCard != null) {
+ System.out.println("Checking card: name = " + creditCard.getCardOwner().getName()
+ + " number = "
+ + creditCard.getCreditCardNumber()
+ + " for amount "
+ + amount);
} else {
System.out.println("Checking card is null");
}
-
+
return "OK";
}
}
diff --git a/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java b/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java
index fb989ae897..7f40910d82 100644
--- a/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java
+++ b/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/test/java/scatours/payment/creditcard/CreditCardPaymentTestCase.java
@@ -19,13 +19,6 @@
package scatours.payment.creditcard;
-import com.tuscanyscatours.payment.creditcard.AuthorizeFault_Exception;
-import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType;
-import com.tuscanyscatours.payment.creditcard.CreditCardPayment;
-import com.tuscanyscatours.payment.creditcard.CreditCardTypeType;
-import com.tuscanyscatours.payment.creditcard.ObjectFactory;
-import com.tuscanyscatours.payment.creditcard.PayerType;
-
import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
@@ -35,6 +28,13 @@ import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
+import com.tuscanyscatours.payment.creditcard.AuthorizeFault_Exception;
+import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType;
+import com.tuscanyscatours.payment.creditcard.CreditCardPayment;
+import com.tuscanyscatours.payment.creditcard.CreditCardTypeType;
+import com.tuscanyscatours.payment.creditcard.ObjectFactory;
+import com.tuscanyscatours.payment.creditcard.PayerType;
+
/**
*
*/
@@ -46,19 +46,19 @@ public class CreditCardPaymentTestCase {
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
- try {
- node = SCANodeFactory.newInstance().createSCANode(null,
- new SCAContribution("creditcard", "./target/classes"));
+ try {
+ node =
+ SCANodeFactory.newInstance().createSCANode(null, new SCAContribution("creditcard", "./target/classes"));
- node.start();
- } catch (Exception ex) {
- ex.printStackTrace();
- }
+ node.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
}
@Test
public void testCreditCardPayment() {
- SCAClient client = (SCAClient) node;
+ SCAClient client = (SCAClient)node;
CreditCardPayment cc = client.getService(CreditCardPayment.class, "CreditCardPayment");
ObjectFactory objectFactory = new ObjectFactory();