Beispiel #1
0
 public static void Empty <T>(this IExpectation <T> e, string message, params object[] args)
 {
     // We have to enforce the constraint at runtime because Expectation<object>
     // is possible and it is meant to represent type erasure caused
     // with EnumerableExpectation.All() or Any()
     e.As <IEnumerable>().Like(Matchers.BeEmpty(), message, (object[])args);
 }
 public static void MemberwiseEqualTo <T>(this IExpectation <T> e, IEnumerable <KeyValuePair <string, object> > expected, string message, params object[] args)
 {
     e.As <object>().Like(Matchers.BeMemberwiseEqualTo(expected));
 }
 public static void MemberwiseEqualTo <T>(this IExpectation <T> e, object expected, string message, params object[] args)
 {
     e.As <object>().Like(Matchers.BeMemberwiseEqualTo(expected));
 }
Beispiel #4
0
 public static void SetEqualTo(this IExpectation <IEnumerable <string> > e, IEnumerable <string> expected, StringComparison comparison, string message, params object[] args)
 {
     e.As <IEnumerable <string> >().Like(Matchers.BeSetEqualTo(expected, comparison), message, (object[])args);
 }
Beispiel #5
0
 public static void ValueType <T>(this IExpectation <T> e, string message, params object[] args)
 {
     e.As <object>().Like(Matchers.BeValueType(), message, args);
 }
Beispiel #6
0
 public static void ValueType <T>(this IExpectation <T> e)
 {
     e.As <object>().Like(Matchers.BeValueType());
 }
Beispiel #7
0
 public static void Length <T>(this IExpectation <T> e, int length, string message, params object[] args)
 {
     e.As <IEnumerable>().Like(Matchers.HaveLength(length), message, (object[])args);
 }
 public static void ReferenceType <T>(this IExpectation <T> e)
 {
     e.As <object>().Like(Matchers.BeReferenceType());
 }
Beispiel #9
0
 public static void Distinct <TSource>(this IExpectation <IEnumerable <TSource> > e, IEqualityComparer <TSource> comparer, string message, params object[] args)
 {
     e.As <IEnumerable <TSource> >().Like(Matchers.BeDistinct(comparer), message, (object[])args);
 }
Beispiel #10
0
 public static void Distinct(this IExpectation <IEnumerable <string> > e, StringComparison comparison, string message, params object[] args)
 {
     e.As <IEnumerable <string> >().Like(Matchers.BeDistinct(comparison), message, (object[])args);
 }
Beispiel #11
0
 public static void InstanceOf <T>(this IExpectation <T> e, Type expected, string message, params object[] args)
 {
     e.As <object>().Like(Matchers.BeInstanceOf(expected), message, args);
 }
Beispiel #12
0
 public static void InstanceOf <T>(this IExpectation <T> e, Type expected)
 {
     e.As <object>().Like(Matchers.BeInstanceOf(expected));
 }
Beispiel #13
0
 public static void Null <T>(this IExpectation <T> e, string message, params object[] args) where T : class
 {
     e.As <object>().Like(Matchers.BeNull(), message, (object[])args);
 }