public void Get() { var testDriveName = "oh-api-test"; var drive = new OHDriveService().Get("5e2f2e24-079d-4f9f-8a4c-287ca044d01d").Result; Assert.AreEqual(testDriveName, drive.Name); }
public static bool DestroyDrive() { var driveService = new OHDriveService(); var drives = driveService.GetAll().Result; var driveToDelete = drives.FirstOrDefault(x => x.Name == "oh-api-test"); return(driveService.Destroy(driveToDelete.DriveID).Result); }
public static OHDrive SetDrive() { var driveService = new OHDriveService(); var driveOptions = new OHDriveOptions(); driveOptions.ClaimType = "exclusive"; driveOptions.Encryption = "none"; driveOptions.Tags = new[] { "newtest", "c-sharp-api-v2" }; var drives = driveService.GetAll().Result; var drive = drives.FirstOrDefault(x => x.Name == "oh-api-test"); return(driveService.Set(drive.DriveID, drive.Name, 1073741824, driveOptions).Result); }
public void GetAll() { var drives = new OHDriveService().GetAll().Result; Assert.AreEqual <int>(1, drives.Count); }
public static OHDrive CreateDrive() { var driveService = new OHDriveService(); return(driveService.Create("oh-api-test", 536870912, null).Result); }
public static List <OHDrive> GetAllDrives() { var driveService = new OHDriveService(); return(driveService.GetAll().Result); }