Esempio n. 1
0
        public void ReadNoFileTest()
        {
            Directory.CreateDirectory(Path.GetDirectoryName(FullPath));
            File.Delete(FullPath);

            var deleted = new DeletedDefaultAc(FullPath);

            Assert.AreEqual(0, deleted.DeletedRegistration().Count());
        }
Esempio n. 2
0
        public void ReadTest()
        {
            Directory.CreateDirectory(Path.GetDirectoryName(FullPath));
            File.WriteAllText(FullPath, text);

            var deleted = new DeletedDefaultAc(FullPath);

            Assert.IsTrue(deleted.DeletedRegistration().SequenceEqual("A-BCDE", "N331D"));
        }
Esempio n. 3
0
        public void NoFileAddThenRead()
        {
            Directory.CreateDirectory(Path.GetDirectoryName(FullPath));
            File.Delete(FullPath);

            var deleted = new DeletedDefaultAc(FullPath);

            deleted.Add("N567S");
            Assert.IsTrue(deleted.DeletedRegistration().SequenceEqual("N567S"));
        }
Esempio n. 4
0
 private void AddToDeletedDefaultAc(string path, string reg)
 {
     if (Paths.PathsAreSame(Path.GetDirectoryName(path), ConfigLoader.DefaultFolderPath))
     {
         var deleted = new DeletedDefaultAc();
         var succeed = deleted.Add(reg);
         if (!succeed)
         {
             ParentControl.ShowError(deleted.ErrorMessage);
         }
     }
 }