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)); }
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); }
public static void ValueType <T>(this IExpectation <T> e, string message, params object[] args) { e.As <object>().Like(Matchers.BeValueType(), message, args); }
public static void ValueType <T>(this IExpectation <T> e) { e.As <object>().Like(Matchers.BeValueType()); }
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()); }
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); }
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); }
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); }
public static void InstanceOf <T>(this IExpectation <T> e, Type expected) { e.As <object>().Like(Matchers.BeInstanceOf(expected)); }
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); }