public void CodeIsNullOrEmptyThrowsArgumentException()
        {
            string code = null;
            MatchingParenFinder finder = new MatchingParenFinder();

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

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

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

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