public void SetAmplaFieldProperty() { ModelProperties <ModelWithAmplaField> modelProperties = new ModelProperties <ModelWithAmplaField>(); ModelWithAmplaField model = new ModelWithAmplaField { FullName = "John Doe" }; bool result = modelProperties.TrySetValueFromString(model, "Full Name", "Jane Doe"); Assert.That(model.FullName, Is.EqualTo("Jane Doe")); Assert.That(result, Is.True); }
public void GetAmplaFieldProperty() { ModelProperties <ModelWithAmplaField> modelProperties = new ModelProperties <ModelWithAmplaField>(); ModelWithAmplaField model = new ModelWithAmplaField { FullName = "John Doe" }; string value; bool result = modelProperties.TryGetPropertyValue(model, "Full Name", out value); Assert.That(value, Is.EqualTo("John Doe")); Assert.That(result, Is.True); }