public void CountOfIntegers_HappyPath_SetsAttributeWithRange(int from, int count)
        {
            object[] values    = Enumerable.Range(from, count).Cast <object>().ToArray();
            var      attribute = new CombinatorialRangeAttribute(from, count);

            Assert.Equal(values, attribute.Values);
        }
Exemple #2
0
        public void CountOfIntegers_HappyPath_SetsAttributeWithRange(int from, int count)
        {
            object[] values    = { 0, 1, 2, 3, 4 };
            var      attribute = new CombinatorialRangeAttribute(from, count);

            Assert.Equal(values, attribute.Values);
        }
        public void IntegerStep_HappyPath_SetsAttributeWithRange(int from, int to, int step)
        {
            object[] expectedValues = Sequence(from, to, step).Cast <object>().ToArray();

            var attribute = new CombinatorialRangeAttribute(from, to, step);

            Assert.Equal(expectedValues, attribute.Values);
        }
Exemple #4
0
        public void IntegerStep_HappyPath_SetsAttributeWithRange(int from, int to, int step, bool unevenInterval)
        {
            object[] expectedValues = unevenInterval ? new object[] { 0, 2, 4, 6 } : new object[] { 0, 2, 4, 6, 8 };

            var attribute = new CombinatorialRangeAttribute(from, to, step);

            Assert.Equal(expectedValues, attribute.Values);
        }