You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by js...@apache.org on 2006/03/06 17:29:57 UTC
svn commit: r383575 -
/incubator/servicemix/trunk/servicemix-wsn2005/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java
Author: jstrachan
Date: Mon Mar 6 08:29:54 2006
New Revision: 383575
URL: http://svn.apache.org/viewcvs?rev=383575&view=rev
Log:
added snippet tags
Modified:
incubator/servicemix/trunk/servicemix-wsn2005/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java
Modified: incubator/servicemix/trunk/servicemix-wsn2005/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-wsn2005/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java?rev=383575&r1=383574&r2=383575&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-wsn2005/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java (original)
+++ incubator/servicemix/trunk/servicemix-wsn2005/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java Mon Mar 6 08:29:54 2006
@@ -136,11 +136,16 @@
public void testRawNotify() throws Exception {
ReceiverComponent receiver = new ReceiverComponent();
jbi.activateComponent(receiver, "receiver");
-
+
+
+ // START SNIPPET: notify
EndpointReferenceType consumer = createEPR(ReceiverComponent.SERVICE, ReceiverComponent.ENDPOINT);
wsnBroker.subscribe(consumer, "myTopic", null, true);
- wsnBroker.notify("myTopic", parse("<hello>world</hello>"));
+ Element body = parse("<hello>world</hello>");
+ wsnBroker.notify("myTopic", body);
+ // END SNIPPET: notify
+
// Wait for notification
Thread.sleep(50);
@@ -154,8 +159,10 @@
}
public void testUnsubscribe() throws Exception {
+ // START SNIPPET: subscribe
PullPoint pullPoint = wsnCreatePullPoint.createPullPoint();
Subscription subscription = wsnBroker.subscribe(pullPoint.getEndpoint(), "myTopic", null);
+ // START SNIPPET: subscribe
wsnBroker.notify("myTopic", new Notify());
// Wait for notification