public void TestLoadConfiguration()
        {
            var sc = new CherryTomato.SkypeController.SkypeController();
            var configString = "<cherryTomato><config><plugins>" +
                "<plugin name=\"Skype\" enabled=\"true\"><inPomodoroStatus>status</inPomodoroStatus></plugin>" +
                "</plugins></config></cherryTomato>";

            var xd = new XmlDocument();
            xd.LoadXml(configString);
            var skypeElement = (XmlElement)xd.SelectSingleNode("cherryTomato/config/plugins/plugin");

            sc.LoadConfiguration(new ConfigurePluginEventArgs(xd));

            Assert.That(sc.Enabled);
            Assert.That(sc.InPomodoroTextTemplate, Is.EqualTo("status"));
        }
Exemple #2
0
        public void TestLoadConfiguration()
        {
            var sc           = new CherryTomato.SkypeController.SkypeController();
            var configString = "<cherryTomato><config><plugins>" +
                               "<plugin name=\"Skype\" enabled=\"true\"><inPomodoroStatus>status</inPomodoroStatus></plugin>" +
                               "</plugins></config></cherryTomato>";

            var xd = new XmlDocument();

            xd.LoadXml(configString);
            var skypeElement = (XmlElement)xd.SelectSingleNode("cherryTomato/config/plugins/plugin");

            sc.LoadConfiguration(new ConfigurePluginEventArgs(xd));

            Assert.That(sc.Enabled);
            Assert.That(sc.InPomodoroTextTemplate, Is.EqualTo("status"));
        }