blob: 943466eda7c57c8c564562b2bb73fd6585e9f18f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package org.apache.qpid.server.management.plugin.servlet.rest;
import java.util.List;
import java.util.Map;
public class SaslRestTest extends QpidRestTestCase
{
public void testGet() throws Exception
{
Map<String, Object> saslData = getJsonAsMap("/rest/sasl");
assertNotNull("mechanisms attribute is not found", saslData.get("mechanisms"));
@SuppressWarnings("unchecked")
List<String> mechanisms = (List<String>) saslData.get("mechanisms");
String[] expectedMechanisms = { "AMQPLAIN", "PLAIN", "CRAM-MD5" };
for (String mechanism : expectedMechanisms)
{
assertTrue("Mechanism " + mechanism + " is not found", mechanisms.contains(mechanism));
}
}
}
|