/// <summary>Initializes a new instance of the <see cref="MutationGuarder"/> class.</summary> /// <param name="fixer">Handles generic resolution.</param> /// <param name="randomizer">Creates objects and populates them with random values.</param> /// <param name="duplicator">Deep clones objects.</param> /// <param name="asserter">Handles common test scenarios.</param> /// <param name="timeout">How long to wait for methods to complete.</param> internal MutationGuarder(GenericFixer fixer, IRandomizer randomizer, IDuplicator duplicator, Asserter asserter, TimeSpan timeout) : base(fixer, randomizer, timeout) { _duplicator = duplicator ?? throw new ArgumentNullException(nameof(duplicator)); _asserter = asserter ?? throw new ArgumentNullException(nameof(asserter)); }
/// <summary>Initializes a new instance of the <see cref="BaseGuarder"/> class.</summary> /// <param name="fixer">Handles generic resolution.</param> /// <param name="randomizer">Creates objects and populates them with random values.</param> /// <param name="timeout">How long to wait for methods to complete.</param> protected BaseGuarder(GenericFixer fixer, IRandomizer randomizer, TimeSpan timeout) { Fixer = fixer ?? throw new ArgumentNullException(nameof(fixer)); Randomizer = randomizer ?? throw new ArgumentNullException(nameof(randomizer)); Timeout = (timeout.TotalMilliseconds is >= -1 and <= int.MaxValue) ? timeout : TimeSpan.FromMilliseconds(-1); }
/// <summary>Initializes a new instance of the <see cref="ExceptionGuarder"/> class.</summary> /// <param name="fixer">Handles generic resolution.</param> /// <param name="randomizer">Creates objects and populates them with random values.</param> /// <param name="asserter">Handles common test scenarios.</param> /// <param name="timeout">How long to wait for methods to complete.</param> internal ExceptionGuarder(GenericFixer fixer, IRandomizer randomizer, Asserter asserter, TimeSpan timeout) : base(fixer, randomizer, timeout) { _asserter = asserter ?? throw new ArgumentNullException(nameof(asserter)); }