public void ShouldFindPropertyEditor() { var editors = new EditorCollection(); var editor = new PropertyEditor(typeof(int), "property"); editors.Add(editor); Assert.AreEqual<PropertyEditor>(editor, editors.FindPropertyEditor(typeof(int), "property")); }
public void AssignsPropertyNameProperty() { PropertyEditor editor = new PropertyEditor(typeof(string), "name"); Assert.AreEqual<string>("name", editor.PropertyName); editor = new PropertyEditor { PropertyName = "name" }; Assert.AreEqual<string>("name", editor.PropertyName); }
public void AssignsDeclaringTypeProperty() { PropertyEditor editor = new PropertyEditor(typeof(string), "name"); Assert.AreEqual<Type>(typeof(string), editor.DeclaringType); editor = new PropertyEditor { DeclaringType = typeof(int) }; Assert.AreEqual<Type>(typeof(int), editor.DeclaringType); }
public void AssignsInlineTemplate() { DataTemplate template = new DataTemplate(); Editor editor = new PropertyEditor(typeof(string), "name", template); Assert.AreEqual(template, editor.InlineTemplate); }