public void FindEndOfLine_ContainsBoth_ShouldReturnFirstIndex(int length, int position)
        {
            // Arrange.
            var data = new byte[length];

            data[position + 0] = Character.CarriageReturn;
            data[position + 1] = Character.LineFeed;

            switch (length - position)
            {
            case 4:
                data[position + 3] = Character.LineFeed;
                goto case 3;

            case 3:
                data[position + 2] = Character.CarriageReturn;
                break;
            }

            var subject = new BinaryString(data);

            // Assert.
            subject.FindEndOfLine().Should().Be((position, EndOfLine.Both));
            subject.FindEndOfLine(position).Should().Be((position, EndOfLine.Both));
        }
        public void FindEndOfLine_NoMarker_ShouldReturnMinusOne(int length, int position)
        {
            // Arrange.
            var data = new byte[length];

            if (position == 1)
            {
                data[0] = Character.LineFeed;
            }
            else if (position > 1)
            {
                data[position - 2] = Character.CarriageReturn;
                data[position - 1] = Character.LineFeed;
            }

            var subject = new BinaryString(data);

            // Assert.
            subject.FindEndOfLine(position).Should().Be((-1, default(EndOfLine)));
        }