Search in sources :

Example 1 with ProxyConfig

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}}"));
}
Also used : ProxyConfig(com.wavefront.agent.ProxyConfig) Test(org.junit.Test)

Aggregations

ProxyConfig (com.wavefront.agent.ProxyConfig)1 Test (org.junit.Test)1