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