public override bool Matches(object actual) { var enumerable = actual as IEnumerable <object>; if (enumerable == null) { return(Problem("An IEnumerable<object>", "Something else")); } foreach (var obj in enumerable) { if (MatchObject(_object, obj as ICmisObject)) { return(true); } } return(Problem("An IEnumerable with " + _object.ToString(), "An IEnumerable without it")); }