public void RangeReversal() { var subject = new QRange(6, -2, 2); var expected = new QRange(2, 2, 6); Assert.Equal(expected, subject.Reverse()); subject = new QRange(1, 1, 0); expected = new QRange(0, -1, 1); Assert.Equal(expected, subject.Reverse()); subject = new QRange(1, 2, 2); expected = new QRange(1, -2, 1); Assert.Equal(expected, subject.Reverse()); }
public void EmptyRangeSamples() { var subject = new QRange(2, 2, 1); Assert.Empty(subject); Assert.Empty(subject.Reverse()); subject = new QRange(2, 1); Assert.Empty(subject); Assert.Empty(subject.Reverse()); subject = new QRange(1, -1, 2); Assert.Empty(subject); Assert.Empty(subject.Reverse()); subject = new QRange(1, 2, 0); Assert.Empty(subject); Assert.Empty(subject.Reverse()); }