Esempio n. 1
0
        public override void OneTimeSetUp()
        {
            base.OneTimeSetUp();    //needs "Conn" in order to use it within "CleanUp"
            Thread.Sleep(5000);

            var localConn = new AutoCheck.Core.Connectors.GDrive(_user, _secret);
            var path      = Path.Combine(_driveFolder, "Test Folder 1", "Test Folder 1.1", "TestFolder 1.1.1");

            localConn.CreateFolder(path);

            path = Path.Combine(_driveFolder, "Test Folder 1", "Test Folder 1.1", "TestFolder 1.1.2");
            localConn.CreateFolder(path);

            path = Path.Combine(_driveFolder, "Test Folder 1", "Test Folder 1.2");
            localConn.CreateFolder(path);

            path = Path.Combine(_driveFolder, "Test Folder 2");
            localConn.CreateFolder(path);

            localConn.CreateFile(GetSampleFile("create.txt"), _driveFolder, "file.txt");

            path = Path.Combine(_driveFolder, "Test Folder 1");
            localConn.CreateFile(GetSampleFile("create.txt"), path, "file 1.txt");

            path = Path.Combine(_driveFolder, "Test Folder 1", "Test Folder 1.1");
            localConn.CreateFile(GetSampleFile("create.txt"), path, "file 1.1.txt");

            path = Path.Combine(_driveFolder, "Test Folder 1", "Test Folder 1.1");
            localConn.CreateFile(GetSampleFile("create.txt"), path, "file 1.2.txt");
        }
Esempio n. 2
0
        protected override void CleanUp()
        {
            var localConn = new AutoCheck.Core.Connectors.GDrive(_user, _secret);

            localConn.DeleteFolder(_driveFolder);

            LocalConnectors.Clear();
            RemoteConnectors.Clear();
        }
Esempio n. 3
0
        public void GetFolder_Throws_ArgumentInvalidException(string path, string folder)
        {
            var localConn = new AutoCheck.Core.Connectors.GDrive(_user, _secret);

            Assert.Throws <ArgumentInvalidException>(() => localConn.GetFolder(path, folder));
        }