Beispiel #1
0
        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());
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        public void ProcessXml_Failure()
        {
            XmlWalker walker = new XmlWalker();

            Assert.IsFalse(walker.ProcessXml(""));
        }
Beispiel #4
0
        public void ProcessXml_Success()
        {
            XmlWalker walker = new XmlWalker();

            Assert.IsTrue(walker.ProcessXml(FileLocation.ConfigFile));
        }