Exemplo n.º 1
1
        /// <summary>
        ///In 的测试
        ///</summary>
        public void In_OutTestHelperString()
        {
            LinkQueue <string> target = new LinkQueue <string>(); // TODO: 初始化为适当的值

            List <string> list = new List <string>()
            {
                "aa", "bb", "cc", "dd", "ee"
            };

            foreach (string item in list)
            {
                target.In(item);
            }

            foreach (string item in list)
            {
                Assert.AreEqual(item, target.Out());
            }

            try
            {
                target.Out();
            }
            catch (Exception myEx)
            {
                Assert.IsInstanceOfType(myEx, typeof(DataStructureException));
            }
        }