/// <summary>
        /// The tested argument collection should contain the same elements as the
        /// specified collection, in the same order.
        /// </summary>
        /// <param name="manager">The constraint manager to match the constraint.</param>
        /// <param name="values">The sequence to test against.</param>
        /// <typeparam name="T">The type of argument to constrain.</typeparam>
        /// <returns>A dummy argument value.</returns>
        public static T IsSameSequenceAs <T>(this IArgumentConstraintManager <T> manager, params object?[] values) where T : IEnumerable
        {
            Guard.AgainstNull(manager, nameof(manager));
            Guard.AgainstNull(values, nameof(values));

            return(manager.IsSameSequenceAs((IEnumerable)values));
        }
 protected override void CreateConstraint(IArgumentConstraintManager <IEnumerable <int> > scope)
 {
     scope.IsSameSequenceAs(new int[] { 1, 2, 3 });
 }
Exemple #3
0
 /// <summary>
 /// The tested argument collection should contain the same elements as the
 /// specified collection, in the same order.
 /// </summary>
 /// <param name="manager">The constraint manager to match the constraint.</param>
 /// <param name="values">The sequence to test against.</param>
 /// <typeparam name="T">The type of argument to constrain.</typeparam>
 /// <returns>A dummy argument value.</returns>
 public static T IsSameSequenceAs <T>(this IArgumentConstraintManager <T> manager, params object[] values) where T : IEnumerable
 {
     return(manager.IsSameSequenceAs((IEnumerable)values));
 }