예제 #1
0
        public void TestGetDriveLetterTrue()
        {
            var path = @"C:\";

            Assert.That(DriveResolver.GetDriveLetter(path), Is.EqualTo("C:"));

            path = @"R:\";

            Assert.That(DriveResolver.GetDriveLetter(path), Is.EqualTo("R:"));
        }
예제 #2
0
        public void TestGetDriveLetterError()
        {
            var path = @"\\W2008SVR6";

            Assert.Throws <ArgumentException>(() => DriveResolver.GetDriveLetter(path));
        }