ARTEMIS-2720 Additional test

I wrote a small / quick test while I was testing the PR #3089
and I decided to keep it with the PR
This commit is contained in:
Clebert Suconic 2020-04-17 16:32:13 -04:00
parent 6441068b95
commit 45a4f6fc39
1 changed files with 12 additions and 0 deletions

View File

@ -65,6 +65,18 @@ public class RepositoryTest extends ActiveMQTestBase {
Assert.assertEquals("abd#", repo.getMatch("a.b.d"));
}
@Test
public void testCacheWithWildcards() throws Throwable {
HierarchicalObjectRepository<String> repo = new HierarchicalObjectRepository<>();
repo.addMatch("#", "root");
Assert.assertEquals("root", repo.getMatch("b"));
repo.addMatch("b", "leaf");
Assert.assertEquals("leaf", repo.getMatch("b"));
}
@Test
public void testMatchingDocsCustomUnderscorDelimiter() throws Throwable {
WildcardConfiguration wildcardConfiguration = new WildcardConfiguration();