Beispiel #1
0
        private static void CheckInvalidGetRangeItemLength(string input, int startIndex)
        {
            RangeItemHeaderValue result = null;

            Assert.Equal(0, RangeItemHeaderValue.GetRangeItemLength(input, startIndex, out result));
            Assert.Null(result);
        }
Beispiel #2
0
        private static void CheckValidGetRangeItemLength(string input, int startIndex, int expectedLength,
                                                         long?expectedFrom, long?expectedTo)
        {
            RangeItemHeaderValue result = null;

            Assert.Equal(expectedLength, RangeItemHeaderValue.GetRangeItemLength(input, startIndex, out result));
            Assert.Equal(expectedFrom, result.From);
            Assert.Equal(expectedTo, result.To);
        }