Fixed Issue #43

This commit is contained in:
selva.andre
2014-05-09 16:33:58 +02:00
parent 8a7db6ee15
commit 17548eeff7
2 changed files with 15 additions and 5 deletions
@@ -59,7 +59,7 @@ public class SubscriptionsStoreTest {
assertEqualsSeq(asArray(Token.EMPTY, "finance", "stock", "ibm"), tokens);
tokens = store.splitTopic("/");
assertEqualsSeq(asArray(Token.EMPTY), tokens);
assertEqualsSeq(asArray(Token.EMPTY, Token.EMPTY), tokens);
}
// @Test(expected = ParseException.class)
@@ -295,10 +295,12 @@ public class SubscriptionsStoreTest {
public void testMatchTopics_single() {
assertTrue(SubscriptionsStore.matchTopics("finance", "+"));
assertTrue(SubscriptionsStore.matchTopics("finance/stock", "finance/+"));
assertFalse(SubscriptionsStore.matchTopics("finance", "finance/+"));
assertTrue(SubscriptionsStore.matchTopics("/finance", "/+"));
assertFalse(SubscriptionsStore.matchTopics("/finance", "+"));
assertTrue(SubscriptionsStore.matchTopics("/finance", "+/+"));
assertTrue(SubscriptionsStore.matchTopics("/finance/stock/ibm", "/finance/+/ibm"));
assertTrue(SubscriptionsStore.matchTopics("/", "+/+"));
assertFalse(SubscriptionsStore.matchTopics("/finance/stock", "+"));
}