public void BasicGetDriveType() { foreach (string drive in VolumeDesktopMethods.GetLogicalDriveStrings()) { var type = VolumeDesktopMethods.GetDriveType(drive); } }
public void BasicLogicalDriveStrings() { var driveStrings = VolumeDesktopMethods.GetLogicalDriveStrings(); driveStrings.Should().NotBeEmpty(); driveStrings.Should().OnlyContain(t => t.Length == 3 && t[0] >= 'A' && t[0] <= 'Z' && t[1] == ':' && t[2] == '\\'); }
public void BasicGetVolumeInformation() { foreach (string drive in VolumeDesktopMethods.GetLogicalDriveStrings()) { try { var info = VolumeDesktopMethods.GetVolumeInformation(drive); info.RootPathName.Should().Be(drive); } catch (DriveNotReadyException) { } catch (DriveLockedException) { } } }