SystemExt.Tests/TokenList.Test.cs
/// <summary>
/// Test usage of the <see cref="TokenList"/> class in restrictive mode.
/// </summary>
Test usage of the  class in restrictive mode.
Test usage of the class in restrictive mode .
[TestMethod]
        public void Restrictive()
        {
            var list = new TokenList(new[] { "1" });
            Assert.IsTrue(list.HasToken("1"));
            Assert.IsFalse(list.HasToken("2"));
            list.AddToken("2");
            Assert.IsTrue(list.HasToken("1"));
            Assert.IsTrue(list.HasToken("2"));
            list.RemoveToken("2");
            Assert.IsTrue(list.HasToken("1"));
            Assert.IsFalse(list.HasToken("2"));
        }
[ TestMethod ] public void Restrictive ( ) { var list = new TokenList ( new [ ] { " " } ) ; Assert . IsTrue ( list . HasToken ( " " ) ) ; Assert . IsFalse ( list . HasToken ( " " ) ) ; list . AddToken ( " " ) ; Assert . IsTrue ( list . HasToken ( " " ) ) ; Assert . IsTrue ( list . HasToken ( " " ) ) ; list . RemoveToken ( " " ) ; Assert . IsTrue ( list . HasToken ( " " ) ) ; Assert . IsFalse ( list . HasToken ( " " ) ) ; }
Test usage of the  class in restrictive mode.
Test usage of the class in restrictive mode .
// Ensure that a basic list is parsed correctly. // Ensure that AddToken on an existing list works. // Ensure that RemoveToken on an existing list works.