コード例 #1
0
        public void Test_AddGet()
        {
            char value = 'a';
            int  index = 0;
            OpenedParantentheses openedParantentheses = new OpenedParantentheses();

            openedParantentheses.AddParenthesis(value, index);
            var(lastVal, lastIndex) = openedParantentheses.GetLast();
            Assert.IsTrue(lastVal.Equals(value));
            Assert.IsTrue(lastIndex == index);
        }
コード例 #2
0
        public void Test_ShouldBeEmpty()
        {
            OpenedParantentheses openedParantentheses = new OpenedParantentheses();

            Assert.IsFalse(openedParantentheses.HasAnyOpen());
        }