Hiram R. Chirino 2006-06-15 15:04:31 +00:00
parent 75270affd8
commit dee685f73c
1 changed files with 43 additions and 0 deletions

View File

@ -298,6 +298,49 @@ public class StompTest extends CombinationTestSupport {
sendFrame(frame); sendFrame(frame);
} }
public void testSubscribeWithMessageSentWithProperties() throws Exception {
String frame =
"CONNECT\n" +
"login: brianm\n" +
"passcode: wombats\n\n"+
Stomp.NULL;
sendFrame(frame);
frame = receiveFrame(100000);
assertTrue(frame.startsWith("CONNECTED"));
frame =
"SUBSCRIBE\n" +
"destination:/queue/" + getQueueName() + "\n" +
"ack:auto\n\n" +
Stomp.NULL;
sendFrame(frame);
MessageProducer producer = session.createProducer(queue);
TextMessage message = session.createTextMessage("Hello World");
message.setStringProperty("s", "value");
message.setBooleanProperty("n", false);
message.setByteProperty("byte", (byte) 9);
message.setDoubleProperty("d", 2.0);
message.setFloatProperty("f", (float) 6.0);
message.setIntProperty("i", 10);
message.setLongProperty("l", 121);
message.setShortProperty("s", (short) 12);
producer.send(message);
frame = receiveFrame(10000);
assertTrue(frame.startsWith("MESSAGE"));
System.out.println("out: "+frame);
frame =
"DISCONNECT\n" +
"\n\n"+
Stomp.NULL;
sendFrame(frame);
}
public void testMessagesAreInOrder() throws Exception { public void testMessagesAreInOrder() throws Exception {
int ctr = 10; int ctr = 10;