Esempio n. 1
0
        public void CodeIsNullOrEmptyThrowsArgumentException()
        {
            string code = null;
            MatchingParenFinder finder = new MatchingParenFinder();

            Assert.Throws(typeof(ArgumentException), () => finder.FindMatchingParenPosition(code, 1000));
        }
Esempio n. 2
0
        public void StartPositionAboveCodeLength()
        {
            string code = "some";
            MatchingParenFinder finder = new MatchingParenFinder();

            Assert.Throws(typeof(ArgumentOutOfRangeException), () => finder.FindMatchingParenPosition(code, 1000));
        }
Esempio n. 3
0
        public void StartPositionNegative()
        {
            string code = "some";
            MatchingParenFinder finder = new MatchingParenFinder();

            Assert.Throws(typeof(ArgumentOutOfRangeException), () => finder.FindMatchingParenPosition(code, -5));
        }
Esempio n. 4
0
 public void StartPositionNegative()
 {
     string code = "some";
     MatchingParenFinder finder = new MatchingParenFinder();
     Assert.Throws(typeof(ArgumentOutOfRangeException), () => finder.FindMatchingParenPosition(code, -5));
 }
Esempio n. 5
0
 public void StartPositionAboveCodeLength()
 {
     string code = "some";
     MatchingParenFinder finder = new MatchingParenFinder();
     Assert.Throws(typeof(ArgumentOutOfRangeException), () => finder.FindMatchingParenPosition(code, 1000));
 }
Esempio n. 6
0
 public void CodeIsNullOrEmptyThrowsArgumentException()
 {
     string code = null;
     MatchingParenFinder finder = new MatchingParenFinder();
     Assert.Throws(typeof(ArgumentException), () => finder.FindMatchingParenPosition(code, 1000));
 }
Esempio n. 7
0
 public int CheckOutcome(string code, int startPosition)
 {
     MatchingParenFinder finder = new MatchingParenFinder();
     return finder.FindMatchingParenPosition(code, startPosition);
 }
Esempio n. 8
0
        public int CheckOutcome(string code, int startPosition)
        {
            MatchingParenFinder finder = new MatchingParenFinder();

            return(finder.FindMatchingParenPosition(code, startPosition));
        }