public void TestToString() { Context c = new Context(); c.Tokens.Add("a"); c.Tokens.Add("b"); c.Tokens.Add("c"); c.Tokens.Add("d"); Assert.AreEqual("abcd", c.ToString()); }
public void TestBranch() { Context c = new Context(); Assert.AreEqual(0, c.Branches.Count); c.Tokens.Add("a"); Context branch = c.Branch("sub1"); Assert.AreEqual(1, c.Branches.Count); Assert.Contains("sub1", c.Branches.Keys); Assert.Contains("a", branch.Tokens); Assert.AreEqual("a", branch.ToString()); }