Пример #1
0
 public void GibridCase1()
 {
     BackUp.BackUp a = new BackUp.BackUp();
     a.AddFile(path1);
     a.AddFile(path2);
     a.CreateCompletePoint();
     a.CreateCompletePoint();
     a.CreateCompletePoint();
     a.CleanerConfigurator(new CleanerConfiguration(3, 10, DateTime.Now.AddSeconds(3), GibridType.OrGibrid, CleanerType.CountCleaner | CleanerType.SizeCleaner));
     Console.WriteLine(a.Count(a));
     Console.WriteLine(a.WriteBackUpSize());
 }
Пример #2
0
 public void UsualCase()
 {
     //int Id, bool TypeOfStorage, CleanerType TypeClean, GibridType TypeGibrid, DateTime time
     BackUp.BackUp a = new BackUp.BackUp();
     a.AddFile(path1);
     a.AddFile(path2);
     //a.RemoveFile("/Users/mikhail/source/repos/oop_lab4/files/test2.txt");
     a.CreateCompletePoint();
     //Console.WriteLine(a.Points.Peek().SavedFiles.Count);
     //Thread.Sleep(70000);
     a.CreateCompletePoint();
     a.CleanerConfigurator(new CleanerConfiguration(1, 200000, DateTime.Now.AddSeconds(3), GibridType.AndGibrid, CleanerType.CountCleaner));
     Console.WriteLine(a.Count(a));
 }
Пример #3
0
 public void IncCase()
 {
     BackUp.BackUp a = new BackUp.BackUp();
     a.AddFile(Changepath1);
     a.AddFile(Changepath2);
     a.CreateCompletePoint();
     using (StreamWriter sw = new StreamWriter(Changepath1, true, System.Text.Encoding.Default))
     {
         sw.WriteLine("snidd");
     }
     a.CreateIncPoint();
     using (StreamWriter sw = new StreamWriter(Changepath1, true, System.Text.Encoding.Default))
     {
         sw.WriteLine("snidd");
     }
     a.CreateIncPoint();
     //a.CreateCompletePoint();
     a.CleanerConfigurator(new CleanerConfiguration(2, 30, DateTime.Now, GibridType.OrGibrid, CleanerType.CountCleaner));
     Console.WriteLine(a.Count(a));
     Console.WriteLine(a.WriteBackUpSize());
 }