use of org.apache.activemq.artemis.core.deployers.impl.FileConfigurationParser in project activemq-artemis by apache.
the class FileConfigurationParserTest method testWildcardConfiguration.
@Test
public void testWildcardConfiguration() throws Exception {
FileConfigurationParser parser = new FileConfigurationParser();
String configStr = firstPart + "<wildcard-addresses>\n<routing-enabled>true</routing-enabled>\n<delimiter>/</delimiter>\n<any-words>></any-words></wildcard-addresses>" + lastPart;
ByteArrayInputStream input = new ByteArrayInputStream(configStr.getBytes(StandardCharsets.UTF_8));
Configuration config = parser.parseMainConfig(input);
WildcardConfiguration wildCard = config.getWildcardConfiguration();
assertEquals('/', wildCard.getDelimiter());
assertTrue(wildCard.isRoutingEnabled());
assertEquals('>', wildCard.getAnyWords());
assertEquals('*', wildCard.getSingleWord());
}
use of org.apache.activemq.artemis.core.deployers.impl.FileConfigurationParser in project activemq-artemis by apache.
the class WrongRoleFileConfigurationParserTest method testParsingDefaultServerConfig.
/**
*/
@Test
public void testParsingDefaultServerConfig() throws Exception {
FileConfigurationParser parser = new FileConfigurationParser();
ByteArrayInputStream input = new ByteArrayInputStream(configuration.getBytes(StandardCharsets.UTF_8));
parser.parseMainConfig(input);
// Using the code only because I don't want a test failing just for someone editing Log text
assertTrue(AssertionLoggerHandler.findText("AMQ222177", "create-durable-queue"));
assertTrue(AssertionLoggerHandler.findText("AMQ222177", "delete-durable-queue"));
}
Aggregations