public void SimpleTest()
        {
            var activityHook = new FakeUserActivityHook();
            var tp = new FakeTimeProvider();

            var fs = new FlowSensor(activityHook);
        }
        public void TestSaveConfiguration()
        {
            var fs = new FlowSensor();

            var xmlHelper = new XmlConfigurationHelper();
            fs.SaveConfiguration(xmlHelper.GetEventArgs());

            var expectedConfig = "<plugins><plugin name=\"User Activity\" enabled=\"True\" /></plugins>";
            Assert.That(xmlHelper.GetPluginsElement().OuterXml, Is.EqualTo(expectedConfig));
        }
        public void TestLoadConfiguration()
        {
            var fs = new FlowSensor();
            var configString = "<cherryTomato><config><plugins>" +
                "<plugin name=\"User Activity\" enabled=\"True\" />" +
                "</plugins></config></cherryTomato>";

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

            fs.LoadConfiguration(new ConfigurePluginEventArgs(xd));

            Assert.That(fs.Enabled);
        }