activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: Question about unit test with activemq
Date Sat, 26 May 2007 14:57:42 GMT
On 5/26/07, Carfield Yim <carfield@carfield.com.hk> wrote:
> I've create a testcase according to
> http://activemq.apache.org/how-to-unit-test-jms-code.html . However,
> after I send the message, how can I assert my message really sent?

How about creating a consumer to receive the message and asserting the
message? There are examples of this throughout the ActiveMQ tests.
There's a really simple one in the
JMSConsumerTest.testReceiveMessageWithConsumer() test:

http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java?view=markup

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/

Mime
View raw message