Search in sources :

Example 1 with AddressImpl

use of org.apache.activemq.artemis.core.postoffice.impl.AddressImpl in project activemq-artemis by apache.

the class AddressImplTest method testF.

@Test
public void testF() {
    SimpleString s1 = new SimpleString("a.b.c.d.e.f");
    SimpleString s2 = new SimpleString("a.b.c.x.e.f");
    SimpleString s3 = new SimpleString("#");
    Address a1 = new AddressImpl(s1);
    Address a2 = new AddressImpl(s2);
    Address w = new AddressImpl(s3);
    Assert.assertTrue(a1.matches(w));
    Assert.assertTrue(a2.matches(w));
}
Also used : Address(org.apache.activemq.artemis.core.postoffice.Address) SimpleString(org.apache.activemq.artemis.api.core.SimpleString) AddressImpl(org.apache.activemq.artemis.core.postoffice.impl.AddressImpl) Test(org.junit.Test)

Example 2 with AddressImpl

use of org.apache.activemq.artemis.core.postoffice.impl.AddressImpl in project activemq-artemis by apache.

the class AddressImplTest method testG.

@Test
public void testG() {
    SimpleString s1 = new SimpleString("a.b.c.d.e.f");
    SimpleString s2 = new SimpleString("a.b.c.x.e.f");
    SimpleString s3 = new SimpleString("a.#");
    Address a1 = new AddressImpl(s1);
    Address a2 = new AddressImpl(s2);
    Address w = new AddressImpl(s3);
    Assert.assertTrue(a1.matches(w));
    Assert.assertTrue(a2.matches(w));
}
Also used : Address(org.apache.activemq.artemis.core.postoffice.Address) SimpleString(org.apache.activemq.artemis.api.core.SimpleString) AddressImpl(org.apache.activemq.artemis.core.postoffice.impl.AddressImpl) Test(org.junit.Test)

Example 3 with AddressImpl

use of org.apache.activemq.artemis.core.postoffice.impl.AddressImpl in project activemq-artemis by apache.

the class AddressImplTest method testDotsSameLength2.

@Test
public void testDotsSameLength2() {
    SimpleString s1 = new SimpleString("a.b");
    SimpleString s2 = new SimpleString("a.b");
    Address a1 = new AddressImpl(s1);
    Address a2 = new AddressImpl(s2);
    Assert.assertTrue(a1.matches(a2));
}
Also used : Address(org.apache.activemq.artemis.core.postoffice.Address) SimpleString(org.apache.activemq.artemis.api.core.SimpleString) AddressImpl(org.apache.activemq.artemis.core.postoffice.impl.AddressImpl) Test(org.junit.Test)

Example 4 with AddressImpl

use of org.apache.activemq.artemis.core.postoffice.impl.AddressImpl in project activemq-artemis by apache.

the class AddressImplTest method testI.

@Test
public void testI() {
    SimpleString s1 = new SimpleString("a.b.c.d.e.f");
    SimpleString s2 = new SimpleString("a.b.c.x.e.f");
    SimpleString s3 = new SimpleString("a.#.b.#");
    Address a1 = new AddressImpl(s1);
    Address a2 = new AddressImpl(s2);
    Address w = new AddressImpl(s3);
    Assert.assertTrue(a1.matches(w));
    Assert.assertTrue(a2.matches(w));
}
Also used : Address(org.apache.activemq.artemis.core.postoffice.Address) SimpleString(org.apache.activemq.artemis.api.core.SimpleString) AddressImpl(org.apache.activemq.artemis.core.postoffice.impl.AddressImpl) Test(org.junit.Test)

Example 5 with AddressImpl

use of org.apache.activemq.artemis.core.postoffice.impl.AddressImpl in project activemq-artemis by apache.

the class AddressImplTest method testM.

@Test
public void testM() {
    SimpleString s1 = new SimpleString("a.b.c");
    SimpleString s2 = new SimpleString("a.b.x.e");
    SimpleString s3 = new SimpleString("a.b.c.#");
    Address a1 = new AddressImpl(s1);
    Address a2 = new AddressImpl(s2);
    Address w = new AddressImpl(s3);
    Assert.assertTrue(a1.matches(w));
    Assert.assertFalse(a2.matches(w));
}
Also used : Address(org.apache.activemq.artemis.core.postoffice.Address) SimpleString(org.apache.activemq.artemis.api.core.SimpleString) AddressImpl(org.apache.activemq.artemis.core.postoffice.impl.AddressImpl) Test(org.junit.Test)

Aggregations

SimpleString (org.apache.activemq.artemis.api.core.SimpleString)23 Address (org.apache.activemq.artemis.core.postoffice.Address)23 AddressImpl (org.apache.activemq.artemis.core.postoffice.impl.AddressImpl)23 Test (org.junit.Test)23