Esempio n. 1
0
        public void TextHelperTest_IsWhitespaceOnlyBetweenPositionsTest()
        {
            ITextProvider tp = new TextStream("0 \n3 \r 7 \r\n    AB ");

            tp.IsWhitespaceOnlyBetweenPositions(0, 1).Should().BeFalse();
            tp.IsWhitespaceOnlyBetweenPositions(1, 2).Should().BeTrue();
            tp.IsWhitespaceOnlyBetweenPositions(2, 5).Should().BeFalse();
            tp.IsWhitespaceOnlyBetweenPositions(5, 10).Should().BeFalse();
            tp.IsWhitespaceOnlyBetweenPositions(tp.Length - 1, tp.Length).Should().BeTrue();
            tp.IsWhitespaceOnlyBetweenPositions(100, 200).Should().BeTrue();
        }