public void BuildMoniteeList()
        {
            XMLDataList.Clear();
            XMLDataList.Load(text);
            int size = XMLDataList.Length;

            Assert.AreEqual(length, size);
            XMLDataListEntry current = XMLDataList.Head;

            while (current != null)
            {
                Assert.IsNotNull(MoniteeList.FindMonitee(current.Data.MoniteePath));
                current = current.Next;
            }

            MoniteeListEntry current2 = MoniteeList.Head;

            while (current2 != null)
            {
                Assert.IsNotNull(current2.Data.Destinations);
                Assert.IsNotNull(current2.Data.Name);
                Assert.IsNotNull(current2.Data.Type);
                current2 = current2.Next;
            }
        }
示例#2
0
        public void TestBackup()
        {
            XMLDataList.Load(text);
            int size = XMLDataList.Length;

            Assert.AreEqual(length, size);
            XMLDataListEntry current = XMLDataList.Head;

            while (current != null)
            {
                Assert.IsNotNull(MoniteeList.FindMonitee(current.Data.MoniteePath));
                current = current.Next;
            }

            XMLDataList.BackUpData();
            Assert.IsTrue(System.IO.File.Exists("MonitoredFolders.bkup"));
            XmlDocument xdoc = new XmlDocument();

            try
            {
                xdoc.Load("MonitoredFolders.bkup");
            }
            catch (Exception e)
            {
                throw;
            }
        }
示例#3
0
        public void DumpDataTest()
        {
            XMLDataList.Load(text);
            int size = XMLDataList.Length;

            Assert.AreEqual(length, size);
            XMLDataListEntry current = XMLDataList.Head;

            while (current != null)
            {
                Assert.IsNotNull(MoniteeList.FindMonitee(current.Data.MoniteePath));
                current = current.Next;
            }

            XMLDataList.DumpAll();

            Assert.IsTrue(System.IO.File.Exists("monitoredfolder.dump"));
        }