Exemple #1
0
        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"));
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
 public void AssignsInlineTemplate()
 {
     DataTemplate template = new DataTemplate();
       Editor editor = new PropertyEditor(typeof(string), "name", template);
       Assert.AreEqual(template, editor.InlineTemplate);
 }