public static PropertyTestExpectedResultsAttribute GetExpectedResults(PropertyInfo propertyInfo, string testId) { PropertyTestExpectedResultsAttribute result = propertyInfo.GetCustomAttributes(true).OfType <PropertyTestExpectedResultsAttribute>().SingleOrDefault(attr => attr.TestId == testId); if (result == null) { result = new PropertyTestExpectedResultsAttribute(); } return(result); }
public static PropertyTestExpectedResultsAttribute GetExpectedResults(PropertyInfo propertyInfo, string testId) { PropertyTestExpectedResultsAttribute result = propertyInfo.GetCustomAttributes(true).OfType<PropertyTestExpectedResultsAttribute>().SingleOrDefault(attr => attr.TestId == testId); if (result == null) { result = new PropertyTestExpectedResultsAttribute(); } return result; }