public void ShouldAllowSettingCategoryName() { CategoryEditor editor = new CategoryEditor(); editor.CategoryName = "category"; Assert.AreEqual<string>("category", editor.CategoryName); }
public void ShouldAllowSettingDeclaringType() { CategoryEditor editor = new CategoryEditor(); editor.DeclaringType = typeof(string); Assert.AreEqual<Type>(typeof(string), editor.DeclaringType); }
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")); }
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); }