summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/contributions/payment-spring-policy/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/travelsample/contributions/payment-spring-policy/src/test/java')
-rw-r--r--sandbox/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java27
-rw-r--r--sandbox/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java3
2 files changed, 18 insertions, 12 deletions
diff --git a/sandbox/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java b/sandbox/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java
index 7d02dccc57..0bff419ccd 100644
--- a/sandbox/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java
+++ b/sandbox/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java
@@ -19,7 +19,6 @@
package scatours.payment;
-import com.tuscanyscatours.payment.Payment;
import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
@@ -28,6 +27,8 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+import com.tuscanyscatours.payment.Payment;
+
/**
*
*/
@@ -36,22 +37,26 @@ public class PaymentTestCase {
private static SCANode creditCardNode;
@BeforeClass
- public static void setUpBeforeClass() throws Exception {
- creditCardNode = SCANodeFactory.newInstance().createSCANode("creditcard.composite",
- new SCAContribution("creditcard", "../creditcard-payment-jaxb-policy/target/classes"));
-
+ public static void setUpBeforeClass() throws Exception {
+ creditCardNode =
+ SCANodeFactory.newInstance()
+ .createSCANode("creditcard.composite",
+ new SCAContribution("creditcard", "../creditcard-payment-jaxb-policy/target/classes"));
+
creditCardNode.start();
-
- paymentNode = SCANodeFactory.newInstance().createSCANode(null,
- new SCAContribution("payment-spring-policy", "./target/classes"),
- new SCAContribution("payment-spring-policy-test", "./target/test-classes"));
+
+ paymentNode =
+ SCANodeFactory.newInstance()
+ .createSCANode(null,
+ new SCAContribution("payment-spring-policy", "./target/classes"),
+ new SCAContribution("payment-spring-policy-test", "./target/test-classes"));
paymentNode.start();
}
-
+
@Test
public void testPayment() {
- SCAClient client = (SCAClient) paymentNode;
+ SCAClient client = (SCAClient)paymentNode;
Payment payment = client.getService(Payment.class, "PaymentClient");
System.out.println("Result = " + payment.makePaymentMember("c-0", 100.00f));
}
diff --git a/sandbox/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java b/sandbox/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java
index d602f57dfc..4f64b20c4e 100644
--- a/sandbox/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java
+++ b/sandbox/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/client/impl/PaymentClientImpl.java
@@ -19,10 +19,11 @@
package scatours.payment.client.impl;
-import com.tuscanyscatours.payment.Payment;
import org.osoa.sca.annotations.Reference;
import org.osoa.sca.annotations.Service;
+import com.tuscanyscatours.payment.Payment;
+
@Service(Payment.class)
public class PaymentClientImpl implements Payment {
@Reference