public void SetModelValue() { var content = new TestContent { Text = "test" }; var newValue = "test2"; field.SetModelValue(content, newValue); Assert.Equal(newValue, content.Text); }
public void SetContentTitle(object contentModel, string title) { if (contentModel == null) { throw new ArgumentNullException(nameof(contentModel)); } if (!IsDefinedTitleField) { throw new InvalidOperationException($"Title field is not defined by content type {Name}."); } titleField.SetModelValue(contentModel, title); }