private static System.Reflection.PropertyInfo GetPropertyFrom(ApiDescription apiDescription) { if (apiDescription == null) throw new ArgumentNullException("apiDescription"); return apiDescription.GetType().GetProperty("ResponseDescription"); }
private static void SetInternalProperty(ApiDescription mockApiDescription, ResponseDescription responseDescription) { var type = mockApiDescription.GetType(); var responseDescriptionProperty = type.GetProperty("ResponseDescription"); responseDescriptionProperty.SetValue(mockApiDescription, responseDescription); }