Exemplo n.º 1
0
        public void CreateSimpleEmptyRange()
        {
            Range range = new Range(0);

            var list = range.ToList();

            Assert.IsNotNull(list);
            Assert.AreEqual(0, list.Count);
        }
Exemplo n.º 2
0
        public void CreateEmptyRangeFromTo()
        {
            Range range = new Range(2, -4);

            var list = range.ToList();

            Assert.IsNotNull(list);
            Assert.AreEqual(0, list.Count);
        }
Exemplo n.º 3
0
        public void CreateSimpleRange()
        {
            Range range = new Range(2);

            var list = range.ToList();

            Assert.IsNotNull(list);
            Assert.AreEqual(2, list.Count);
            Assert.AreEqual(0, list[0]);
            Assert.AreEqual(1, list[1]);
        }
Exemplo n.º 4
0
        public void CreateRangeFromToStep()
        {
            Range range = new Range(2, 6, 2);

            var list = range.ToList();

            Assert.IsNotNull(list);
            Assert.AreEqual(2, list.Count);
            Assert.AreEqual(2, list[0]);
            Assert.AreEqual(4, list[1]);
        }