Commit 1d159ac6 authored by Guillaume Surrel's avatar Guillaume Surrel

Minor corrections.

parent 74346ff6
......@@ -24,7 +24,6 @@ package joram.dmq;
import java.util.List;
import org.objectweb.joram.client.jms.Destination;
import org.objectweb.joram.client.jms.Queue;
import org.objectweb.joram.client.jms.admin.AdminModule;
......@@ -42,7 +41,7 @@ public class TestDmq6 extends TestCase {
public void run() {
try {
boolean defaultCreate = false, dmq = false, dmq1 = false;
boolean defaultCreate = false, dmq = false, dmq1 = false, queue = false, topic = false;
System.out.println("server start");
startAgentServer((short)0);
......@@ -54,19 +53,18 @@ public class TestDmq6 extends TestCase {
Destination[] list1 = AdminModule.getDestinations();
for(int i = 0;i < list1.length; i++){
Destination dest = list1[i];
if (dest.getAdminName().equals("queue")) {
assertTrue(dest.isQueue());
assertTrue(dest.isFreelyWriteable());
assertTrue(dest.isFreelyReadable());
assertEquals(2,((Queue)dest).getThreshold());
} else if (dest.getAdminName().equals("queue")) {
queue = true;
} else if (dest.getAdminName().equals("topic")) {
assertTrue(dest.isTopic());
assertTrue(dest.isFreelyWriteable());
assertTrue(dest.isFreelyReadable());
}
if(dest.getAdminName().equals("defaultdmq")){
topic = true;
} else if(dest.getAdminName().equals("defaultdmq")){
List listeI = dest.getReaders();
assertEquals("dmq",((User)listeI.get(0)).getName());
assertEquals(dest,AdminModule.getDefaultDMQ());
......@@ -81,8 +79,11 @@ public class TestDmq6 extends TestCase {
assertEquals("dmq",((User)listeI.get(0)).getName());
dmq1 = true;
}
}
assertTrue(queue);
assertTrue(topic);
assertTrue(defaultCreate);
assertTrue(dmq);
assertTrue(dmq1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment