Ejemplo n.º 1
0
 /// <summary>
 /// Constraint that an item in the argument at
 /// the given index passes the given constraint
 /// </summary>
 /// <param name="index"></param>
 /// <param name="constraint"></param>
 /// <returns></returns>
 public T Element(int index, AbstractConstraint constraint)
 {
     ArgumentManager.AddArgument(List.Element(index, constraint));
     return(default(T));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constraint that argument is equal to
 /// the given collection
 /// </summary>
 /// <param name="collection"></param>
 /// <returns></returns>
 public T Equal(ICollection collection)
 {
     ArgumentManager.AddArgument(List.Equal(collection));
     return(default(T));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Constraint that argument count passes
 /// the given constraint
 /// </summary>
 /// <param name="constraint"></param>
 /// <returns></returns>
 public T Count(AbstractConstraint constraint)
 {
     ArgumentManager.AddArgument(List.Count(constraint));
     return(default(T));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constraint that each item in the argument
 /// exists in the given collection
 /// </summary>
 /// <param name="collection"></param>
 /// <returns></returns>
 public T ContainsAll(ICollection collection)
 {
     ArgumentManager.AddArgument(List.ContainsAll(collection));
     return(default(T));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Constraint that argument is equal to one
 /// of the items in the given collection
 /// </summary>
 /// <param name="collection"></param>
 /// <returns></returns>
 public T OneOf(ICollection collection)
 {
     ArgumentManager.AddArgument(List.OneOf(collection));
     return(default(T));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Constraint that argument contains the
 /// give object
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public T IsIn(object item)
 {
     ArgumentManager.AddArgument(List.IsIn(item));
     return(default(T));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Constraint that an item in the argument
 /// matching to the given item passes the given
 /// constraint
 /// </summary>
 /// <typeparam name="TItem"></typeparam>
 /// <param name="item"></param>
 /// <param name="constraint"></param>
 /// <returns></returns>
 public T Element <TItem>(TItem item, AbstractConstraint constraint)
 {
     ArgumentManager.AddArgument(List.Element <TItem>(item, constraint));
     return(default(T));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Constraint that argument matches the
 /// given regular expression
 /// </summary>
 /// <param name="pattern"></param>
 /// <returns></returns>
 public string Like(string pattern)
 {
     ArgumentManager.AddArgument(Text.Like(pattern));
     return(null);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Constraint that argument contains the
 /// given value (ordinal)
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public string Contains(string value)
 {
     ArgumentManager.AddArgument(Text.Contains(value));
     return(null);
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Constraint that argument ends with the
 /// given value (ordinal)
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public string EndsWith(string value)
 {
     ArgumentManager.AddArgument(Text.EndsWith(value));
     return(null);
 }