use of com.wavefront.agent.ProxyConfig in project java by wavefrontHQ.
the class SQSQueueFactoryImplTest method testQueueTemplate.
@Test
public void testQueueTemplate() {
// we have to have all three
assertTrue(SQSQueueFactoryImpl.isValidSQSTemplate("{{id}}{{entity}}{{port}}"));
assertTrue(SQSQueueFactoryImpl.isValidSQSTemplate(new ProxyConfig().getSqsQueueNameTemplate()));
// Typo or missing one (or all) of the three keys in some fashion
assertFalse(SQSQueueFactoryImpl.isValidSQSTemplate("{{id}{{entity}}{{port}}"));
assertFalse(SQSQueueFactoryImpl.isValidSQSTemplate("{{id}}{entity}}{{port}}"));
assertFalse(SQSQueueFactoryImpl.isValidSQSTemplate("{{id}}{{entity}}{port}}"));
assertFalse(SQSQueueFactoryImpl.isValidSQSTemplate(""));
assertFalse(SQSQueueFactoryImpl.isValidSQSTemplate("{{id}}"));
assertFalse(SQSQueueFactoryImpl.isValidSQSTemplate("{{entity}}"));
assertFalse(SQSQueueFactoryImpl.isValidSQSTemplate("{{port}}"));
}
Aggregations