public void Test_Trivial_Bool_Props(string propName) { var queryParams = new LodgingQueryParamsModel(); var prop = queryParams.GetType().GetProperty(propName); prop.SetValue(queryParams, true); Assert.Equal(true, prop.GetValue(queryParams)); }
public void Test_Clamped_Props_Double(string propName, double min, double max) { var queryParams = new LodgingQueryParamsModel(); var prop = queryParams.GetType().GetProperty(propName); prop.SetValue(queryParams, -99999999); Assert.Equal(min, prop.GetValue(queryParams)); if (min != max) { prop.SetValue(queryParams, 99999999); Assert.Equal(max, prop.GetValue(queryParams)); } }