Exemplo n.º 1
0
        public void ShouldAllowSettingCategoryName()
        {
            CategoryEditor editor = new CategoryEditor();
              editor.CategoryName = "category";

              Assert.AreEqual<string>("category", editor.CategoryName);
        }
Exemplo n.º 2
0
        public void ShouldAllowSettingDeclaringType()
        {
            CategoryEditor editor = new CategoryEditor();
              editor.DeclaringType = typeof(string);

              Assert.AreEqual<Type>(typeof(string), editor.DeclaringType);
        }
Exemplo n.º 3
0
        public void ShouldFindCategoryEditor()
        {
            EditorCollection editors = new EditorCollection();
              CategoryEditor editor = new CategoryEditor(typeof(int), "category", new DataTemplate());
              editors.Add(editor);

              Assert.AreEqual<CategoryEditor>(editor, editors.FindCategoryEditor(typeof(int), "category"));
        }
Exemplo n.º 4
0
        public void ShouldInitilizePropertiesFromConstructor()
        {
            DataTemplate template = new DataTemplate();
              CategoryEditor editor = new CategoryEditor(typeof(string), "category", template);

              Assert.AreEqual<Type>(typeof(string), editor.DeclaringType);
              Assert.AreEqual<string>("category", editor.CategoryName);
              Assert.AreEqual(template, editor.InlineTemplate);
        }