tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r931718 - in /tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions: payment-bpel/src/test/java/scatours/payment/ payment-groovy/src/test/java/scatours/payment/ payment-java-callback/src/test/java/scatours/payment/ payment-java-po...
Date Wed, 07 Apr 2010 23:00:53 GMT
Author: nash
Date: Wed Apr  7 23:00:52 2010
New Revision: 931718

URL: http://svn.apache.org/viewvc?rev=931718&view=rev
Log:
Ensure all variations of PaymentTestCase throw exceptions when they fail (TUSCANY-3407)

Modified:
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/PaymentTestCase.java
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/PaymentTestCase.java
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-callback/src/test/java/scatours/payment/PaymentTestCase.java
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-reference-pass/src/test/java/scatours/payment/PaymentTestCase.java
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java/src/test/java/scatours/payment/PaymentTestCase.java
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-python/src/test/java/scatours/payment/PaymentTestCase.java
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/java/scatours/payment/PaymentTestCase.java
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/PaymentTestCase.java

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/PaymentTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/PaymentTestCase.java?rev=931718&r1=931717&r2=931718&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/PaymentTestCase.java
(original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-bpel/src/test/java/scatours/payment/PaymentTestCase.java
Wed Apr  7 23:00:52 2010
@@ -70,7 +70,11 @@ public class PaymentTestCase {
     public void testPayment() {
         SCAClient client = (SCAClient)paymentNode;
         Payment payment = client.getService(Payment.class, "PaymentClient");
-        System.out.println("Result = " + payment.makePaymentMember("Fred", 100.00f));
+        String result = payment.makePaymentMember("Fred", 100.00f);
+        System.out.println("Result = " + result);
+        if (!"OK".equals(result)) {
+            throw new RuntimeException(result);
+        }
     }
 
     @AfterClass

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/PaymentTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/PaymentTestCase.java?rev=931718&r1=931717&r2=931718&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/PaymentTestCase.java
(original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-groovy/src/test/java/scatours/payment/PaymentTestCase.java
Wed Apr  7 23:00:52 2010
@@ -69,7 +69,11 @@ public class PaymentTestCase {
     public void testPayment() {
         SCAClient client = (SCAClient)paymentNode;
         Payment payment = client.getService(Payment.class, "PaymentClient");
-        System.out.println("Result = " + payment.makePaymentMember("Fred", 100.00f));
+        String result = payment.makePaymentMember("Fred", 100.00f);
+        System.out.println("Result = " + result);
+        if (!"Success".equals(result)) {
+            throw new RuntimeException(result);
+        }
     }
 
     @AfterClass

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-callback/src/test/java/scatours/payment/PaymentTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-callback/src/test/java/scatours/payment/PaymentTestCase.java?rev=931718&r1=931717&r2=931718&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-callback/src/test/java/scatours/payment/PaymentTestCase.java
(original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-callback/src/test/java/scatours/payment/PaymentTestCase.java
Wed Apr  7 23:00:52 2010
@@ -73,9 +73,17 @@ public class PaymentTestCase {
         }
         
         System.out.println("===================================================");      
 
-        System.out.println("\n\nPaymentCallbackID  - Status = \n\n" + paymentCallbackID.makePaymentMember("c-0",
20000.00f));
+        String result = paymentCallbackID.makePaymentMember("c-0", 20000.00f);
+        System.out.println("\n\nPaymentCallbackID  - Status = \n\n" + result);
+        if (!"OK".equals(result)) {
+            throw new RuntimeException(result);
+        }
         System.out.println("===================================================");
-        System.out.println("\n\nPaymentCallbackRedirect  - Status = \n\n" + paymentCallbackRedirect.makePaymentMember("c-0",
20000.00f));
+        result = paymentCallbackRedirect.makePaymentMember("c-0", 20000.00f);
+        System.out.println("\n\nPaymentCallbackRedirect  - Status = \n\n" + result);
+        if (!"OK".equals(result)) {
+            throw new RuntimeException(result);
+        }
         System.out.println("===================================================");
 
         

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java?rev=931718&r1=931717&r2=931718&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java
(original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java
Wed Apr  7 23:00:52 2010
@@ -54,7 +54,11 @@ public class PaymentTestCase {
         SCAClient client = (SCAClient)node1;
         Payment payment = client.getService(Payment.class, "Payment");
 
-        System.out.println("\n\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0",
100.00f));
+        String result = payment.makePaymentMember("c-0", 100.00f);
+        System.out.println("\n\nSuccessful Payment - Status = \n\n" + result);
+        if (!"OK".equals(result)) {
+            throw new RuntimeException(result);
+        }
         System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1",
100.00f));
     }
 

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-reference-pass/src/test/java/scatours/payment/PaymentTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-reference-pass/src/test/java/scatours/payment/PaymentTestCase.java?rev=931718&r1=931717&r2=931718&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-reference-pass/src/test/java/scatours/payment/PaymentTestCase.java
(original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java-reference-pass/src/test/java/scatours/payment/PaymentTestCase.java
Wed Apr  7 23:00:52 2010
@@ -48,7 +48,11 @@ public class PaymentTestCase {
         Payment payment = client.getService(Payment.class, "Payment");
 
         System.out.println("===================================================");
-        System.out.println("\n\nPayment - Status = \n\n" + payment.makePaymentMember("c-0",
100.00f));
+        String result = payment.makePaymentMember("c-0", 100.00f);
+        System.out.println("\n\nPayment - Status = \n\n" + result);
+        if (!"OK".equals(result)) {
+            throw new RuntimeException(result);
+        }
         System.out.println("===================================================");
         
     }

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java/src/test/java/scatours/payment/PaymentTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java/src/test/java/scatours/payment/PaymentTestCase.java?rev=931718&r1=931717&r2=931718&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java/src/test/java/scatours/payment/PaymentTestCase.java
(original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-java/src/test/java/scatours/payment/PaymentTestCase.java
Wed Apr  7 23:00:52 2010
@@ -49,7 +49,11 @@ public class PaymentTestCase {
         SCAClient client = (SCAClient)node;
         Payment payment = client.getService(Payment.class, "Payment");
 
-        System.out.println("\n\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0",
100.00f));
+        String result = payment.makePaymentMember("c-0", 100.00f);
+        System.out.println("\n\nSuccessful Payment - Status = \n\n" + result);
+        if (!"OK".equals(result)) {
+            throw new RuntimeException(result);
+        }
         System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1",
100.00f));
     }
 

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-python/src/test/java/scatours/payment/PaymentTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-python/src/test/java/scatours/payment/PaymentTestCase.java?rev=931718&r1=931717&r2=931718&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-python/src/test/java/scatours/payment/PaymentTestCase.java
(original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-python/src/test/java/scatours/payment/PaymentTestCase.java
Wed Apr  7 23:00:52 2010
@@ -69,7 +69,11 @@ public class PaymentTestCase {
     public void testPayment() {
         SCAClient client = (SCAClient)paymentNode;
         Payment payment = client.getService(Payment.class, "PaymentClient");
-        System.out.println("Result = " + payment.makePaymentMember("Fred", 100.00f));
+        String result = payment.makePaymentMember("Fred", 100.00f);
+        System.out.println("Result = " + result);
+        if (!"Success".equals(result)) {
+            throw new RuntimeException(result);
+        }
     }
 
     @AfterClass

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java?rev=931718&r1=931717&r2=931718&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java
(original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring-policy/src/test/java/scatours/payment/PaymentTestCase.java
Wed Apr  7 23:00:52 2010
@@ -58,7 +58,11 @@ public class PaymentTestCase {
     public void testPayment() {
         SCAClient client = (SCAClient)paymentNode;
         Payment payment = client.getService(Payment.class, "PaymentClient");
-        System.out.println("Result = " + payment.makePaymentMember("c-0", 100.00f));
+        String result = payment.makePaymentMember("c-0", 100.00f);
+        System.out.println("Result = " + result);
+        if (!"OK".equals(result)) {
+            throw new RuntimeException(result);
+        }
     }
 
     @AfterClass

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/java/scatours/payment/PaymentTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/java/scatours/payment/PaymentTestCase.java?rev=931718&r1=931717&r2=931718&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/java/scatours/payment/PaymentTestCase.java
(original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring-scatag/src/test/java/scatours/payment/PaymentTestCase.java
Wed Apr  7 23:00:52 2010
@@ -59,7 +59,11 @@ public class PaymentTestCase {
     public void testPayment() {
         SCAClient client = (SCAClient)paymentNode;
         Payment payment = client.getService(Payment.class, "PaymentClient");
-        System.out.println("Result = " + payment.makePaymentMember("Fred", 100.00f));
+        String result = payment.makePaymentMember("Fred", 100.00f);
+        System.out.println("Result = " + result);
+        if (!"OK".equals(result)) {
+            throw new RuntimeException(result);
+        }
     }
 
     @AfterClass

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/PaymentTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/PaymentTestCase.java?rev=931718&r1=931717&r2=931718&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/PaymentTestCase.java
(original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/payment-spring/src/test/java/scatours/payment/PaymentTestCase.java
Wed Apr  7 23:00:52 2010
@@ -58,7 +58,11 @@ public class PaymentTestCase {
     public void testPayment() {
         SCAClient client = (SCAClient)paymentNode;
         Payment payment = client.getService(Payment.class, "PaymentClient");
-        System.out.println("Result = " + payment.makePaymentMember("c-0", 100.00f));
+        String result = payment.makePaymentMember("c-0", 100.00f);
+        System.out.println("Result = " + result);
+        if (!"OK".equals(result)) {
+            throw new RuntimeException(result);
+        }
     }
 
     @AfterClass



Mime
View raw message