Search in sources :

Example 16 with AddressImpl

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

the class AddressImplTest method testN.

@Test
public void testN() {
    SimpleString s1 = new SimpleString("usd.stock");
    SimpleString s2 = new SimpleString("a.b.x.e");
    SimpleString s3 = new SimpleString("*.stock.#");
    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)

Example 17 with AddressImpl

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

the class AddressImplTest method testS.

@Test
public void testS() {
    SimpleString s1 = new SimpleString("a.b.c.d");
    SimpleString s3 = new SimpleString("a.b.c*");
    Address a1 = new AddressImpl(s1);
    Address w = new AddressImpl(s3);
    Assert.assertFalse(a1.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 18 with AddressImpl

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

the class AddressImplTest method testU.

@Test
public void testU() {
    SimpleString s1 = new SimpleString("a.b.c.d");
    SimpleString s3 = new SimpleString("*a.b.c");
    Address a1 = new AddressImpl(s1);
    Address w = new AddressImpl(s3);
    Assert.assertFalse(a1.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 19 with AddressImpl

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

the class AddressImplTest method testP.

@Test
public void testP() {
    SimpleString s1 = new SimpleString("a.b.c.d");
    SimpleString s3 = new SimpleString("a.b.c#");
    Address a1 = new AddressImpl(s1);
    Address w = new AddressImpl(s3);
    Assert.assertFalse(a1.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 20 with AddressImpl

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

the class AddressImplTest method testH.

@Test
public void testH() {
    SimpleString s1 = new SimpleString("a.b.c.d.e.f");
    SimpleString s2 = new SimpleString("a.b.c.x.e.f");
    SimpleString s3 = new SimpleString("#.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)

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