public void NormalizeRange_ReturnsNullWhenRangeEndEqualsZero() { // Arrange & Act var normalizedRange = RangeHelper.NormalizeRange(new RangeItemHeaderValue(null, 0), 1); // Assert Assert.Null(normalizedRange); }
public void NormalizeRange_ReturnsNullWhenRangeStartEqualsOrGreaterThanLength(long start, long end) { // Arrange & Act var normalizedRange = RangeHelper.NormalizeRange(new RangeItemHeaderValue(start, end), 1); // Assert Assert.Null(normalizedRange); }
public void NormalizeRange_ReturnsRangeWithNoChange() { // Arrange & Act var normalizedRange = RangeHelper.NormalizeRange(new RangeItemHeaderValue(1, 3), 4); // Assert Assert.Equal(1, normalizedRange.From); Assert.Equal(3, normalizedRange.To); }
public void NormalizeRange_ReturnsNormalizedRange(long?start, long?end, long?normalizedStart, long?normalizedEnd) { // Arrange & Act var normalizedRange = RangeHelper.NormalizeRange(new RangeItemHeaderValue(start, end), 3); // Assert Assert.Equal(normalizedStart, normalizedRange.From); Assert.Equal(normalizedEnd, normalizedRange.To); }