예제 #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);
 }
예제 #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);
 }
예제 #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);
 }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
 }
예제 #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);
        }
예제 #9
0
 public void New_range(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, 2).ToArray(),
                  c.ToArrayOf(new[] { 0, 1, 2 }));
 }
예제 #10
0
 public void Range_with_step(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, 4, 2).ToArray(),
                  c.ToArrayOf(new[] { 0, 2, 4 }));
 }
예제 #11
0
 public void New_negative_range(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, -2).ToArray(),
                  c.ToArrayOf(new[] { 0, -1, -2 }));
 }
예제 #12
0
 public void Range_with_step(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, 4, 2).ToArray(),
         c.ToArrayOf(new[] { 0, 2, 4 }));
 }
예제 #13
0
 public void New_range(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, 2).ToArray(),
         c.ToArrayOf(new[] { 0, 1, 2 }));
 }
예제 #14
0
 public void New_negative_range(IRangeConverter c)
 {
     Assert.Equal(c.Range(0, -2).ToArray(),
         c.ToArrayOf(new[] { 0, -1, -2 }));
 }