Advertisement
slik1977

Testing_Backups_Evtyukhov

Feb 24th, 2022
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.66 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3.  
  4. namespace Backups
  5. {
  6.     internal class Program
  7.     {
  8.         private static void Main()
  9.         {
  10.             BackupService a = new BackupService(new TestSingleStorageAlgo(), new MockRepo());
  11.             JobObject x = new JobObject("dima");
  12.             a.AddJobObject(x);
  13.             for (int i = 0; i < 500; i++)
  14.             {
  15.                 a.MakePoint();
  16.             }
  17.  
  18.             Console.WriteLine(a.Repository.NumberOfRestorePoints);
  19.             /* Directory.CreateDirectory(
  20.                 Directory.GetParent(Environment.CurrentDirectory)?.Parent?.Parent?.Parent?.FullName +
  21.                 "/Backups/WorkFiles/");
  22.             FileStream fileStream1 = File.Create(
  23.                 Directory.GetParent(Environment.CurrentDirectory)?.Parent?.Parent?.Parent?.FullName +
  24.                 "/Backups/WorkFiles/1.txt");
  25.  
  26.             fileStream1.Close();
  27.  
  28.             Directory.CreateDirectory(
  29.                 Directory.GetParent(Environment.CurrentDirectory)?.Parent?.Parent?.Parent?.FullName +
  30.                 "/Backups/BackupWorkFiles/");
  31.             BackupService a = new BackupService(new SplitStoragesAlgo(), new Repository(Directory.GetParent(Environment.CurrentDirectory)?.Parent?.Parent?.Parent?.FullName + "/Backups/BackupWorkFiles/"));
  32.             JobObject x = new JobObject(Directory.GetParent(Environment.CurrentDirectory)?.Parent?.Parent?.Parent?.FullName + "/Backups/WorkFiles/1.txt");
  33.             a.AddJobObject(x);
  34.             for (int i = 0; i < 500; i++)
  35.             {
  36.                 a.MakePoint();
  37.             }
  38.  
  39.             Console.WriteLine(a.Repository.NumberOfRestorePoints);*/
  40.         }
  41.     }
  42. }
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement