Example #1
0
 public void TestWildCardReturnsEmptyCollection()
 {
     TST<int> tst = new TST<int>();
     string[] keys = testKeystwo.Split(' ');
     for (int i = 0; i < keys.Length; i++)
     {
         tst.Put(keys[i], i);
     }
     Assert.IsTrue(tst.WildcardMatch(null).Count() == 0);
     Assert.IsTrue(tst.WildcardMatch("").Count() == 0);
 }
Example #2
0
 public void TestWildCard()
 {
     TST<int> tst = new TST<int>();
     string[] keys = testKeystwo.Split(' ');
     for (int i = 0; i < keys.Length; i++)
     {
         tst.Put(keys[i], i);
     }
     Assert.IsTrue(tst.WildcardMatch("..e").Count() == 3);
     foreach (var key in tst.WildcardMatch("..e"))
     {
         Assert.IsTrue(key.EndsWith("e"));
     }
 }