public virtual void AddFirst() { TokenQueue tq = new TokenQueue("One Two"); tq.ConsumeWord(); tq.AddFirst("Three"); NUnit.Framework.Assert.AreEqual("Three Two", tq.Remainder()); }
public virtual void ChompBalanced() { TokenQueue tq = new TokenQueue(":contains(one (two) three) four"); String pre = tq.ConsumeTo("("); String guts = tq.ChompBalanced('(', ')'); String remainder = tq.Remainder(); NUnit.Framework.Assert.AreEqual(":contains", pre); NUnit.Framework.Assert.AreEqual("one (two) three", guts); NUnit.Framework.Assert.AreEqual(" four", remainder); }