diff options
Diffstat (limited to 'sandbox/travelsample/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment')
2 files changed, 18 insertions, 15 deletions
diff --git a/sandbox/travelsample/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/PaymentTestCase.java b/sandbox/travelsample/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/PaymentTestCase.java index 395bc0d3d4..a69c16a726 100644 --- a/sandbox/travelsample/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/PaymentTestCase.java +++ b/sandbox/travelsample/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/PaymentTestCase.java @@ -37,25 +37,28 @@ public class PaymentTestCase { @BeforeClass public static void setUpBeforeClass() throws Exception { - - creditCardNode = SCANodeFactory.newInstance().createSCANode("creditcard.composite", - new SCAContribution("creditcard", "../../shared-contributions/creditcardpayment-contribution/target/test-classes")); - emailGatewayNode = SCANodeFactory.newInstance().createSCANode("emailgateway.composite", - new SCAContribution("creditcard", "../../shared-contributions/emailgateway-contribution/target/test-classes")); - paymentNode = SCANodeFactory.newInstance().createSCANode("payment.composite", - new SCAContribution("payment", "./target/test-classes")); - - creditCardNode.start(); - emailGatewayNode.start(); - paymentNode.start(); + try { + creditCardNode = SCANodeFactory.newInstance().createSCANode("creditcard.composite", + new SCAContribution("creditcard", "../../shared-contributions/creditcard-payment-jaxb-contribution/target/test-classes")); + emailGatewayNode = SCANodeFactory.newInstance().createSCANode("emailgateway.composite", + new SCAContribution("creditcard", "../../shared-contributions/emailgateway-contribution/target/test-classes")); + paymentNode = SCANodeFactory.newInstance().createSCANode("payment.composite", + new SCAContribution("payment-bpel", "./target/classes"), + new SCAContribution("payment-bpel-test", "./target/test-classes")); + + creditCardNode.start(); + emailGatewayNode.start(); + paymentNode.start(); + } catch (Exception ex) { + ex.printStackTrace(); + } } @Test public void testPayment() { SCAClient client = (SCAClient) paymentNode; Payment payment = client.getService(Payment.class, "PaymentClient"); - //[nash] Following line is disabled because of NPE problem - //System.out.println("Result = " + payment.makePayment("Fred", 100.00f)); + System.out.println("Result = " + payment.makePaymentMember("Fred", 100.00f)); } @AfterClass diff --git a/sandbox/travelsample/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/client/PaymentClientImpl.java b/sandbox/travelsample/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/client/PaymentClientImpl.java index 06a99e4326..eaa7498e84 100644 --- a/sandbox/travelsample/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/client/PaymentClientImpl.java +++ b/sandbox/travelsample/chapter-06/payment-bpel-contribution/src/test/java/scatours/payment/client/PaymentClientImpl.java @@ -29,9 +29,9 @@ public class PaymentClientImpl implements Payment { @Reference protected Payment payment; - public String makePayment(String customerId, float amount) { + public String makePaymentMember(String customerId, float amount) { // Delegate the external web service - return payment.makePayment(customerId, amount); + return payment.makePaymentMember(customerId, amount); } } |