Exemplo n.º 1
0
        public void FromDriveLetter_Valid()
        {
            string driveLetter = GenerateRandomLetter() + ":";
            char   letter      = DriveLetterTools.FromDriveLetter(driveLetter);

            Assert.AreEqual(driveLetter, letter + ":");
        }
Exemplo n.º 2
0
 public void FromDriveLetter_InvalidPattern()
 {
     DriveLetterTools.FromDriveLetter("drive123");
 }
Exemplo n.º 3
0
        public void FromDriveLetter_NotALetter()
        {
            string driveLetter = GenerateRandomNonLetter() + ":";

            DriveLetterTools.FromDriveLetter(driveLetter);
        }
Exemplo n.º 4
0
 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return DriveLetterTools.FromDriveLetter(value.ToString());
 }