Ejemplo n.º 1
0
        public void Verify_that_when_ValueArray_is_created_the_correct_amount_of_slots_are_created()
        {
            var size   = 3;
            var result = ValueArrayUtils.CreateDefaultValueArray(size);

            Assert.AreEqual(size, result.Count);
        }
        /// <summary>
        /// Resets the <see cref="ValueArray{T}"/> of the <see cref="Manual"/> to proper amount of slots and default value of "-"
        /// </summary>
        public void ResetManual()
        {
            if (this.valueArraySize == 0)
            {
                var parameterType = this.QueryParameterType();
                this.valueArraySize = parameterType.NumberOfValues;
            }

            this.Manual = ValueArrayUtils.CreateDefaultValueArray(this.valueArraySize);
        }
Ejemplo n.º 3
0
        public void Verify_that_when_size_smaller_than_one_ArgumentOutOfRangeException_is_trown()
        {
            var size = 0;

            Assert.Throws <ArgumentOutOfRangeException>(() => ValueArrayUtils.CreateDefaultValueArray(size));
        }