Beispiel #1
0
 public void Range_have(IRangeConverter c)
 {
     var range = c.Range(0, 4, 2);
     Assert.Equal(range.Contains(2), true);
     Assert.Equal(range.Contains(0), true);
     Assert.Equal(range.Contains(4), true);
 }
Beispiel #2
0
 public void Range_doesn_not_have(IRangeConverter c)
 {
     var range = c.Range(0, 4, 2);
     Assert.Equal(range.Contains(-1), false);
     Assert.Equal(range.Contains(1), false);
     Assert.Equal(range.Contains(5), false);
 }
Beispiel #3
0
 public void Negative_range_have(IRangeConverter c)
 {
     var range = c.Range(0, -4, 2);
     Assert.Equal(range.Contains(-2), true);
     Assert.Equal(range.Contains(0), true);
     Assert.Equal(range.Contains(-4), true);
 }
Beispiel #4
0
        public void Range_doesn_not_have(IRangeConverter c)
        {
            var range = c.Range(0, 4, 2);

            Assert.Equal(range.Contains(-1), false);
            Assert.Equal(range.Contains(1), false);
            Assert.Equal(range.Contains(5), false);
        }
Beispiel #5
0
        public void Negative_range_have(IRangeConverter c)
        {
            var range = c.Range(0, -4, 2);

            Assert.Equal(range.Contains(-2), true);
            Assert.Equal(range.Contains(0), true);
            Assert.Equal(range.Contains(-4), true);
        }
Beispiel #6
0
        public void Range_have(IRangeConverter c)
        {
            var range = c.Range(0, 4, 2);

            Assert.Equal(range.Contains(2), true);
            Assert.Equal(range.Contains(0), true);
            Assert.Equal(range.Contains(4), true);
        }
Beispiel #7
0
 public void Negative_range_does_not_have(IRangeConverter c)
 {
     var range = c.Range(0, -4, 2);
     Assert.Equal(range.Contains(1), false);
     Assert.Equal(range.Contains(4), false);
     Assert.Equal(range.Contains(-1), false);
     Assert.Equal(range.Contains(-3), false);
 }
Beispiel #8
0
        public void Negative_range_does_not_have(IRangeConverter c)
        {
            var range = c.Range(0, -4, 2);

            Assert.Equal(range.Contains(1), false);
            Assert.Equal(range.Contains(4), false);
            Assert.Equal(range.Contains(-1), false);
            Assert.Equal(range.Contains(-3), false);
        }
Beispiel #9
0
 public void New_range(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, 2).ToArray(),
                  c.ToArrayOf(new[] { 0, 1, 2 }));
 }
Beispiel #10
0
 public void Range_with_step(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, 4, 2).ToArray(),
                  c.ToArrayOf(new[] { 0, 2, 4 }));
 }
Beispiel #11
0
 public void New_negative_range(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, -2).ToArray(),
                  c.ToArrayOf(new[] { 0, -1, -2 }));
 }
Beispiel #12
0
 public void Range_with_step(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, 4, 2).ToArray(),
         c.ToArrayOf(new[] { 0, 2, 4 }));
 }
Beispiel #13
0
 public void New_range(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, 2).ToArray(),
         c.ToArrayOf(new[] { 0, 1, 2 }));
 }
Beispiel #14
0
 public void New_negative_range(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, -2).ToArray(),
         c.ToArrayOf(new[] { 0, -1, -2 }));
 }