Created
August 21, 2012 19:42
-
-
Save bgswan/3418656 to your computer and use it in GitHub Desktop.
Pathalogical Mock Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JMSMockObjectFactory objectFactory = new JMSMockObjectFactory(); | |
JMSTestModule testModule = new JMSTestModule(objectFactory); | |
TopicConnectionFactory beTopicConnectionFactory = objectFactory.createMockTopicConnectionFactory(); | |
Topic beTopic = objectFactory.getDestinationManager().createTopic("sampleTopic"); | |
//Perform you test - Publish the message | |
//Create the expected Message by the subscriber | |
MockMessage mockmessage = new MockMessage(); | |
//set properties to mockmessage | |
//condition - similar to assertequals | |
testModule.verifyReceivedTopicMessageEquals("sampleTopic", 1, mockmessage); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment