/// <summary>
        /// Initializes a new instance of the <see cref="Miracle.FileZilla.Api.Test.RandomTriStateSequenceGenerator"/> class
        /// for a specific range of TriStates.
        /// </summary>
        /// <param name="minTriState">The lower bound of the TriState range.</param>
        /// <param name="maxTriState">The uppder bound of the TriState range.</param>
        /// <exception cref="ArgumentException">
        /// <paramref name="minTriState"/> is greater than <paramref name="maxTriState"/>.
        /// </exception>
        public RandomTriStateSequenceGenerator(TriState minTriState, TriState maxTriState)
        {
            if (minTriState >= maxTriState)
            {
                throw new ArgumentException("The 'minTriState' argument must be less than the 'maxTriState'.");
            }

            this.randomizer = new RandomNumericSequenceGenerator((byte)minTriState, (byte)maxTriState);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="RandomDateTimeSequenceGenerator"/> class
        /// for a specific range of dates.
        /// </summary>
        /// <param name="minDate">The lower bound of the date range.</param>
        /// <param name="maxDate">The upper bound of the date range.</param>
        /// <exception cref="ArgumentException">
        /// <paramref name="minDate"/> is greater than <paramref name="maxDate"/>.
        /// </exception>
        public RandomDateTimeSequenceGenerator(DateTime minDate, DateTime maxDate)
        {
            if (minDate >= maxDate)
            {
                throw new ArgumentException("The 'minDate' argument must be less than the 'maxDate'.");
            }

            this.randomizer = new RandomNumericSequenceGenerator(minDate.Ticks, maxDate.Ticks);
        }
        public DateTimeWithAccuracySpecimenBuilder(DateTime minDate, DateTime maxDate, long accuracy)
        {
            if (minDate >= maxDate)
                throw new ArgumentException("The 'minDate' argument must be less than the 'maxDate'.");

            this.accuracy = accuracy;

            this.randomizer = new RandomNumericSequenceGenerator(minDate.Ticks, maxDate.Ticks);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="Miracle.FileZilla.Api.Test.RandomTimeSpanSequenceGenerator"/> class
        /// for a specific range of TimeSpans.
        /// </summary>
        /// <param name="minTimeSpan">The lower bound of the TimeSpan range.</param>
        /// <param name="maxTimeSpan">The uppder bound of the TimeSpan range.</param>
        /// <param name="noFractions">Do not generate fraction of seconds</param>
        /// <exception cref="ArgumentException">
        /// <paramref name="minTimeSpan"/> is greater than <paramref name="maxTimeSpan"/>.
        /// </exception>
        public RandomTimeSpanSequenceGenerator(TimeSpan minTimeSpan, TimeSpan maxTimeSpan, bool noFractions)
        {
            _noFractions = noFractions;
            if (minTimeSpan >= maxTimeSpan)
            {
                throw new ArgumentException("The 'minTimeSpan' argument must be less than the 'maxTimeSpan'.");
            }

            _randomizer = new RandomNumericSequenceGenerator(minTimeSpan.Ticks, maxTimeSpan.Ticks);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="RandomOptionGenerator"/> class.
 /// </summary>
 public RandomOptionGenerator()
 {
     _randomizer = new RandomNumericSequenceGenerator((byte)OptionType.Text, (byte)OptionType.Numeric);
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="RandomBooleanSequenceGenerator"/> class.
 /// </summary>
 public RandomBooleanSequenceGenerator()
 {
     this.randomBooleanNumbers =
         new RandomNumericSequenceGenerator(0, 1);
 }
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="RandomBooleanSequenceGenerator"/> class.
 /// </summary>
 public RandomBooleanSequenceGenerator()
 {
     this.randomBooleanNumbers =
         new RandomNumericSequenceGenerator(0, 1);
 }
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="RandomCharSequenceGenerator"/> class.
 /// </summary>
 public RandomCharSequenceGenerator()
 {
     this.randomPrintableCharNumbers =
         new RandomNumericSequenceGenerator(33, 126);
 }
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="RandomCharSequenceGenerator"/> class.
 /// </summary>
 public RandomCharSequenceGenerator()
 {
     this.randomPrintableCharNumbers =
         new RandomNumericSequenceGenerator(33, 126);
 }