예제 #1
0
 /// <summary>
 /// Asserts against an expected attribute, with a matcher for the attribute
 /// </summary>
 /// <param name="with"></param>
 /// <param name="customMessage"></param>
 /// <typeparam name="TAttribute"></typeparam>
 /// <returns></returns>
 public static IMore <MethodInfo> Attribute <TAttribute>(
     this IWith <MethodInfo> with,
     string customMessage
     ) where TAttribute : Attribute
 {
     return(with.Attribute <TAttribute>(() => customMessage));
 }
예제 #2
0
 /// <summary>
 /// Asserts against an expected attribute, with a matcher for the attribute
 /// </summary>
 /// <param name="with"></param>
 /// <param name="matcher"></param>
 /// <param name="customMessage"></param>
 /// <typeparam name="TAttribute"></typeparam>
 /// <returns></returns>
 public static IMore <MethodInfo> Attribute <TAttribute>(
     this IWith <MethodInfo> with,
     Func <TAttribute, bool> matcher,
     string customMessage
     ) where TAttribute : Attribute
 {
     return(with.Attribute(
                matcher, () => customMessage
                ));
 }
예제 #3
0
 /// <summary>
 /// Asserts against an expected attribute, with a matcher for the attribute
 /// </summary>
 /// <param name="with"></param>
 /// <param name="matcher"></param>
 /// <typeparam name="TAttribute"></typeparam>
 /// <returns></returns>
 public static IMore <MethodInfo> Attribute <TAttribute>(
     this IWith <MethodInfo> with,
     Func <TAttribute, bool> matcher
     ) where TAttribute : Attribute
 {
     return(with.Attribute(
                matcher,
                NULL_STRING
                ));
 }
예제 #4
0
 /// <summary>
 /// Asserts against an expected attribute, with a matcher for the attribute
 /// </summary>
 /// <param name="with"></param>
 /// <param name="customMessageGenerator"></param>
 /// <typeparam name="TAttribute"></typeparam>
 /// <returns></returns>
 public static IMore <MethodInfo> Attribute <TAttribute>(
     this IWith <MethodInfo> with,
     Func <string> customMessageGenerator
     ) where TAttribute : Attribute
 {
     return(with.Attribute(
                null as Func <TAttribute, bool>,
                customMessageGenerator
                ));
 }
예제 #5
0
 /// <summary>
 /// Asserts against an expected attribute, with a matcher for the attribute
 /// </summary>
 /// <param name="with"></param>
 /// <typeparam name="TAttribute"></typeparam>
 /// <returns></returns>
 public static IMore <MethodInfo> Attribute <TAttribute>(
     this IWith <MethodInfo> with
     ) where TAttribute : Attribute
 {
     return(with.Attribute <TAttribute>(NULL_STRING));
 }