private void SetAndGet(Parameters.Parameters parameters, string property, object value) { var prop = parameters.GetType().GetProperty(property); if (prop == null) { throw new ArgumentException($"Could not find property '{property}'"); } prop.SetValue(parameters, value); var val = prop.GetValue(parameters); Assert.AreEqual(value, val); }