コード例 #1
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));
        }
コード例 #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));
        }
コード例 #3
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"));
        }
コード例 #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"));
        }
コード例 #5
0
 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);
        }