tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isil...@apache.org
Subject svn commit: r575021 - /incubator/tuscany/java/sca/samples/binding-notification-producer/src/test/java/notification/producer/TrafficAdvisoryTestCase.java
Date Wed, 12 Sep 2007 17:37:38 GMT
Author: isilval
Date: Wed Sep 12 10:37:37 2007
New Revision: 575021

URL: http://svn.apache.org/viewvc?rev=575021&view=rev
Log:
Update test case

Modified:
    incubator/tuscany/java/sca/samples/binding-notification-producer/src/test/java/notification/producer/TrafficAdvisoryTestCase.java

Modified: incubator/tuscany/java/sca/samples/binding-notification-producer/src/test/java/notification/producer/TrafficAdvisoryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/binding-notification-producer/src/test/java/notification/producer/TrafficAdvisoryTestCase.java?rev=575021&r1=575020&r2=575021&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/binding-notification-producer/src/test/java/notification/producer/TrafficAdvisoryTestCase.java
(original)
+++ incubator/tuscany/java/sca/samples/binding-notification-producer/src/test/java/notification/producer/TrafficAdvisoryTestCase.java
Wed Sep 12 10:37:37 2007
@@ -18,6 +18,9 @@
  */
 package notification.producer;
 
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
 import notification.producer.TestCaseProducer;
 
 import org.apache.tuscany.sca.host.embedded.SCADomain;
@@ -31,13 +34,32 @@
     
     public void testTrafficAdvisoryNotification() throws Exception {
         System.out.println("Only instantiating and closing domain ...");
+        TestCaseProducer testCaseProducer = domain.getService(TestCaseProducer.class, "TrafficAdvisoryProducer");
+
+        /* Uncomment to test with consumer
+        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
+        String value = "foo";
+        do {
+            try {
+                System.out.println("Send a report value, ^C or <end> to end");
+                value = reader.readLine();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            if(value == null || value.equals("end")) {
+                break;
+            }
+            testCaseProducer.produceTrafficNotification("Report value [" + value + "]");
+            value = "end";
+        }
+        while(true);
+        */
     }
 
     @Override
     protected void setUp() throws Exception {
         try {
             domain = SCADomain.newInstance("TrafficAdvisoryNotification.composite");
-            domain.getService(TestCaseProducer.class, "TrafficAdvisoryProducer");
         } catch(Throwable e) {
             e.printStackTrace();
             if (e instanceof Exception) {



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message