public void FromDriveLetter_Valid() { string driveLetter = GenerateRandomLetter() + ":"; char letter = DriveLetterTools.FromDriveLetter(driveLetter); Assert.AreEqual(driveLetter, letter + ":"); }
public void FromDriveLetter_InvalidPattern() { DriveLetterTools.FromDriveLetter("drive123"); }
public void FromDriveLetter_NotALetter() { string driveLetter = GenerateRandomNonLetter() + ":"; DriveLetterTools.FromDriveLetter(driveLetter); }
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return DriveLetterTools.FromDriveLetter(value.ToString()); }