public async Task GetPartitions() { var sut = new LowLevelApi(); var partitions = await sut.GetPartitions(await sut.GetPhoneDisk()); Assert.NotNull(partitions); }
public async Task GetVolume() { var sut = new LowLevelApi(); var partition = (await sut.GetPartitions(await sut.GetPhoneDisk())).Skip(2).First(); var volume = await sut.GetVolume(partition); Assert.NotNull(volume); }
public async Task <Partition> GetBootEfiEspPartition() { var parts = await LowLevelApi.GetPartitions(this); return(parts .OrderByDescending(x => x.Number) .FirstOrDefault(x => Equals(x.PartitionType, PartitionType.Esp))); }
public async Task AssignLetter() { var sut = new LowLevelApi(); var phoneDisk = await sut.GetPhoneDisk(); var partitionToFormat = (await sut.GetPartitions(phoneDisk)).Single(x => x.Number == 6); var toAssign = await sut.GetVolume(partitionToFormat); await sut.AssignDriveLetter(toAssign, 'I'); }
public async Task Format() { var sut = new LowLevelApi(); var phoneDisk = await sut.GetPhoneDisk(); var partitionToFormat = (await sut.GetPartitions(phoneDisk)).Single(x => x.Number == 6); var toFormat = await sut.GetVolume(partitionToFormat); await sut.Format(toFormat, FileSystemFormat.Ntfs, "Test"); }
public async Task <Partition> GetReservedPartition() { var parts = await LowLevelApi.GetPartitions(this); return(parts.FirstOrDefault(x => Equals(x.PartitionType, PartitionType.Reserved))); }
public Task <List <Partition> > GetPartitions() { return(LowLevelApi.GetPartitions(this)); }