public void Build_Sucessful() { XsdReader reader = new XsdReader(); ConfigurationFile.Xsd = new Element(); if (reader.ProcessSchema(FileLocation.XsdFile)) { NewRelic.AgentConfiguration.MainForm.XsdPath = FileLocation.XsdFile; } XmlWalker xm = new XmlWalker(); xm.ProcessXml(FileLocation.ConfigFile); NewRelic.AgentConfiguration.MainForm.ConfigPath = FileLocation.ConfigFile;; ConfigMerge cm = new ConfigMerge(); FlowLayoutPanel panel = new FlowLayoutPanel(); ToolTip mainFormToolTip = new ToolTip(); UIBuilder ui = new UIBuilder(panel, mainFormToolTip); ui.Build(true); Assert.IsTrue(panel.Controls.Count > 0, panel.Controls.Count.ToString()); }
public void Merge_Success() { XsdReader reader = new XsdReader(); ConfigurationFile.Xsd = new Element(); if (reader.ProcessSchema(FileLocation.XsdFile)) { NewRelic.AgentConfiguration.MainForm.XsdPath = FileLocation.XsdFile; } XmlWalker xm = new XmlWalker(); xm.ProcessXml(FileLocation.ConfigFile); NewRelic.AgentConfiguration.MainForm.ConfigPath = FileLocation.ConfigFile;; ConfigMerge cm = new ConfigMerge(); //How to test this? It just does it with the defaults //I could refactor to make it take the config and xsd so I could replace them with elements. Assert.IsTrue(true); }
public void ProcessXml_Failure() { XmlWalker walker = new XmlWalker(); Assert.IsFalse(walker.ProcessXml("")); }
public void ProcessXml_Success() { XmlWalker walker = new XmlWalker(); Assert.IsTrue(walker.ProcessXml(FileLocation.ConfigFile)); }