コード例 #1
0
ファイル: EqualConstraint.cs プロジェクト: zzekikaya/nunit
 /// <summary>
 /// Flag the constraint to use the supplied predicate function
 /// </summary>
 /// <param name="comparison">The comparison function to use.</param>
 /// <returns>Self.</returns>
 public EqualConstraint Using <TCollectionType, TMemberType>(Func <TCollectionType, TMemberType, bool> comparison)
 {
     _comparer.ExternalComparers.Add(EqualityAdapter.For(comparison));
     return(this);
 }
コード例 #2
0
 /// <summary>
 /// Flag the constraint to use the supplied IComparer object.
 /// </summary>
 /// <param name="comparer">The IComparer object to use.</param>
 /// <returns>Self.</returns>
 public CollectionItemsEqualConstraint Using <T>(IComparer <T> comparer)
 {
     this.comparer.ExternalComparers.Add(EqualityAdapter.For(comparer));
     return(this);
 }
コード例 #3
0
ファイル: EqualConstraint.cs プロジェクト: zzekikaya/nunit
 /// <summary>
 /// Flag the constraint to use the supplied boolean-returning delegate.
 /// </summary>
 /// <param name="comparer">The boolean-returning delegate to use.</param>
 /// <returns>Self.</returns>
 public EqualConstraint Using <T>(Func <T, T, bool> comparer)
 {
     _comparer.ExternalComparers.Add(EqualityAdapter.For(comparer));
     return(this);
 }
コード例 #4
0
ファイル: EqualConstraint.cs プロジェクト: zzekikaya/nunit
 /// <summary>
 /// Flag the constraint to use the supplied IEqualityComparer object.
 /// </summary>
 /// <param name="comparer">The IComparer object to use.</param>
 /// <returns>Self.</returns>
 public EqualConstraint Using <T>(IEqualityComparer <T> comparer)
 {
     _comparer.ExternalComparers.Add(EqualityAdapter.For(comparer));
     return(this);
 }
コード例 #5
0
 /// <summary>
 /// Flag the constraint to use the supplied Comparison object.
 /// </summary>
 /// <param name="comparer">The IComparer object to use.</param>
 /// <returns>Self.</returns>
 public EqualConstraint Using <T>(Comparison <T> comparer)
 {
     this.comparer.ExternalComparers.Add(EqualityAdapter.For(comparer));
     return(this);
 }
コード例 #6
0
 /// <summary>
 /// Flag the constraint to use the supplied predicate function
 /// </summary>
 /// <param name="comparison">The comparison function to use.</param>
 /// <returns>Self.</returns>
 public CollectionSubsetConstraint Using <TSubsetType, TSupersetType>(Func <TSubsetType, TSupersetType, bool> comparison)
 {
     base.Using(EqualityAdapter.For(comparison));
     return(this);
 }
コード例 #7
0
 /// <summary>
 /// Flag the constraint to use the supplied predicate function
 /// </summary>
 /// <param name="comparison">The comparison function to use.</param>
 /// <returns>Self.</returns>
 public CollectionEquivalentConstraint Using <TActual, TExpected>(Func <TActual, TExpected, bool> comparison)
 {
     base.Using(EqualityAdapter.For(comparison));
     return(this);
 }
コード例 #8
0
 /// <summary>
 /// Flag the constraint to use the supplied IEqualityComparer object.
 /// </summary>
 /// <param name="comparer">The IComparer object to use.</param>
 /// <returns>Self.</returns>
 public CollectionItemsEqualConstraint Using(IEqualityComparer comparer)
 {
     this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
     return(this);
 }
コード例 #9
0
ファイル: EqualConstraint.cs プロジェクト: runegri/MobiTest
 /// <summary>
 /// Flag the constraint to use the supplied IEqualityComparer object.
 /// </summary>
 /// <param name="comparer">The IComparer object to use.</param>
 /// <returns>Self.</returns>
 public EqualConstraint Using <T>(IEqualityComparer <T> comparer)
 {
     this.comparer.ExternalComparer = EqualityAdapter.For(comparer);
     return(this);
 }
コード例 #10
0
 /// <summary>
 /// Flag the constraint to use the supplied IComparer object.
 /// </summary>
 /// <param name="comparer">The IComparer object to use.</param>
 /// <returns>Self.</returns>
 public CollectionItemsEqualConstraint Using <T>(IComparer <T> comparer)
 {
     return(Using(EqualityAdapter.For(comparer)));
 }
コード例 #11
0
 /// <summary>
 /// Flag the constraint to use the supplied IEqualityComparer object.
 /// </summary>
 /// <param name="comparer">The IComparer object to use.</param>
 /// <returns>Self.</returns>
 public ContainsConstraint Using <T>(IEqualityComparer <T> comparer)
 {
     return(AddAdapter(EqualityAdapter.For(comparer)));
 }
コード例 #12
0
 /// <summary>
 /// Flag the constraint to use the supplied IComparer object.
 /// </summary>
 /// <param name="comparer">The IComparer object to use.</param>
 /// <returns>Self.</returns>
 public ContainsConstraint Using(IComparer comparer)
 {
     return(AddAdapter(EqualityAdapter.For(comparer)));
 }
コード例 #13
0
 /// <summary>
 /// Flag the constraint to use the supplied IEqualityComparer object.
 /// </summary>
 /// <param name="comparer">The IEqualityComparer object to use.</param>
 public AnyOfConstraint Using(IEqualityComparer comparer)
 {
     _comparer.ExternalComparers.Add(EqualityAdapter.For(comparer));
     return(this);
 }
コード例 #14
0
 /// <summary>
 /// Flag the constraint to use the supplied IEqualityComparer object.
 /// </summary>
 /// <param name="comparer">The IComparer object to use.</param>
 /// <returns>Self.</returns>
 public ContainsConstraint Using <T>(IEqualityComparer <T> comparer)
 {
     this.adapter = EqualityAdapter.For(comparer);
     return(this);
 }
コード例 #15
0
 /// <summary>
 /// Flag the constraint to use the supplied Comparison object.
 /// </summary>
 /// <param name="comparison">The Comparison object to use.</param>
 public CollectionItemsEqualConstraint Using <T>(Comparison <T> comparison)
 {
     _comparer.ExternalComparers.Add(EqualityAdapter.For(comparison));
     return(this);
 }