public void TestFormatterSet() { CssXmlFormatter formatter = new CssXmlFormatter(); xtvc.Formatter = formatter; Assert.AreEqual(formatter, xtvc.Formatter, "Formatter setter property incorrectly implemented."); }
public void TestFormatterGet() { //Test normally CssXmlFormatter formatter = new CssXmlFormatter(); xtvc.Formatter = formatter; Assert.AreEqual(formatter, xtvc.Formatter, "Formatter getter property incorrectly implemented."); //Test with null (CssXmlFormatter instance shoould be returned) xtvc.Formatter = null; Assert.IsTrue(xtvc.Formatter is CssXmlFormatter, "Formatter getter property incorrectly implemented."); }
public void Demonstartion() { //The following lines demonstrates creating the control dynamically in code. //For information on how to embed this control in a page at design time see CS Section 4. //Create control XmlTreeViewControl firstXTVC = new XmlTreeViewControl(); //Set some xml string xml = File.ReadAllText("../../test_files/valid.xml"); firstXTVC.Xml = xml; //Set the properties of the XmlTreeViewControl firstXTVC.FolderIconUrl = "folder.png"; firstXTVC.ExpandingCssClass = "expanding"; firstXTVC.ExpandingFailureText = "Failed"; firstXTVC.ExpandingIconUrl = "folder_go.png"; firstXTVC.ExpandingText = "Expanding..."; firstXTVC.FolderIconUrl = "folder.png"; firstXTVC.LeafIconUrl = "bullet_green.png"; firstXTVC.SaveFileName = "XmlTree.xml"; firstXTVC.SaveButtonIconUrl = "disk.png"; firstXTVC.Prefixes = new string[] { " ", " ", " " }; //Specify formatter to use and set it's properties CssXmlFormatter formatter = new CssXmlFormatter(); formatter.AttributeNameCSSClass = "myANClass"; formatter.AttributeValueCSSClass = "myAVClass"; formatter.CommentCSSClass = "myCMClass"; formatter.Indentation = 4; formatter.InnerTextCSSClass = "myITClass"; formatter.NodeNameCSSClass = "myNNClass"; formatter.TagCSSClass = "myTGClass"; firstXTVC.Formatter = formatter; }
public void TearDown() { cxf = null; }
public void SetUp() { cxf = new CssXmlFormatter(); }