public void TestSaveConfiguration()
        {
            var mc = new MSNController();
            mc.InPomodoroTextTemplate = "status";

            var xd = new XmlDocument();
            var skypeElement = xd.CreateElement("plugins");

            mc.SaveConfiguration(skypeElement);

            var expectedConfig = "<plugins><plugin name=\"MSN\" enabled=\"True\"><inPomodoroStatus>status</inPomodoroStatus></plugin></plugins>";
            Assert.That(skypeElement.OuterXml, Is.EqualTo(expectedConfig));
        }
예제 #2
0
        public void TestSaveConfiguration()
        {
            var mc = new MSNController();

            mc.InPomodoroTextTemplate = "status";

            var xd           = new XmlDocument();
            var skypeElement = xd.CreateElement("plugins");

            mc.SaveConfiguration(skypeElement);

            var expectedConfig = "<plugins><plugin name=\"MSN\" enabled=\"True\"><inPomodoroStatus>status</inPomodoroStatus></plugin></plugins>";

            Assert.That(skypeElement.OuterXml, Is.EqualTo(expectedConfig));
        }
        public void TestLoadConfiguration()
        {
            var mc = new MSNController();
            var configString = "<cherryTomato><config><plugins>" +
                "<plugin name=\"MSN\" 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");

            mc.LoadConfiguration(skypeElement);

            Assert.That(mc.Enabled);
            Assert.That(mc.InPomodoroTextTemplate, Is.EqualTo("status"));
        }
예제 #4
0
        public void TestLoadConfiguration()
        {
            var mc           = new MSNController();
            var configString = "<cherryTomato><config><plugins>" +
                               "<plugin name=\"MSN\" 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");

            mc.LoadConfiguration(skypeElement);

            Assert.That(mc.Enabled);
            Assert.That(mc.InPomodoroTextTemplate, Is.EqualTo("status"));
        }
 public void TestGetStatus()
 {
     var mc = new MSNController();
     Debug.WriteLine("Status: " + mc.Status + "\nStatus text: " + mc.StatusText);
 }
예제 #6
0
        public void TestGetStatus()
        {
            var mc = new MSNController();

            Debug.WriteLine("Status: " + mc.Status + "\nStatus text: " + mc.StatusText);
        }