Example #1
0
        public bool HasAttribute(Type attributeType, Attribute expectedAttribute)
        {
            var attrs = Attribute.GetCustomAttributes(_methodInfo, attributeType);
            var any   = attrs.Any(
                currentAttribute => Are.Alike(expectedAttribute, currentAttribute)
                );

            return(any);
        }
Example #2
0
        public bool HasAttribute <T>(T expectedAttribute) where T : Attribute
        {
            var attrs = Attribute.GetCustomAttributes(_methodInfo, typeof(T));
            var any   = attrs.Any(
                currentAttribute => Are.Alike(expectedAttribute, currentAttribute)
                );

            return(any);
        }
Example #3
0
 public static T IsLike <T>(T expected)
 {
     return(Arg.Is <T>(arg => Are.Alike(expected, arg)));
 }