public void testSingleNodeIndex()
        {
            ITreeAdaptor adaptor  = new CommonTreeAdaptor();
            TreeWizard   wiz      = new TreeWizard(adaptor, tokens);
            CommonTree   t        = (CommonTree)wiz.Create("ID");
            IDictionary  m        = wiz.Index(t);
            string       actual   = CollectionUtils.DictionaryToString(m);
            string       expected = "{10=[ID]}";

            Assert.AreEqual(expected, actual);
        }
        public void testRepeatsIndex()
        {
            ITreeAdaptor adaptor = new CommonTreeAdaptor();
            TreeWizard   wiz     = new TreeWizard(adaptor, tokens);
            CommonTree   t       = (CommonTree)wiz.Create("(A B (A C B) B D D)");
            IDictionary  m       = wiz.Index(t);
            string       actual  = CollectionUtils.DictionaryToString(m);
            //string expected = "{8=[D, D], 6=[B, B, B], 7=[C], 5=[A, A]}";
            string expected = "{8=[D, D], 7=[C], 6=[B, B, B], 5=[A, A]}";

            Assert.AreEqual(expected, actual);
        }
 public void testSingleNodeIndex()
 {
     ITreeAdaptor adaptor = new CommonTreeAdaptor();
     TreeWizard wiz = new TreeWizard(adaptor, tokens);
     CommonTree t = (CommonTree)wiz.Create("ID");
     IDictionary m = wiz.Index(t);
     string actual = CollectionUtils.DictionaryToString(m);
     string expected = "{10=[ID]}";
     Assert.AreEqual(expected, actual);
 }
 public void testRepeatsIndex()
 {
     ITreeAdaptor adaptor = new CommonTreeAdaptor();
     TreeWizard wiz = new TreeWizard(adaptor, tokens);
     CommonTree t = (CommonTree)wiz.Create("(A B (A C B) B D D)");
     IDictionary m = wiz.Index(t);
     string actual = CollectionUtils.DictionaryToString(m);
     //string expected = "{8=[D, D], 6=[B, B, B], 7=[C], 5=[A, A]}";
     string expected = "{8=[D, D], 7=[C], 6=[B, B, B], 5=[A, A]}";
     Assert.AreEqual(expected, actual);
 }