System.IO.Tests.Directory_CreateDirectory.SubdirectoryOnNotReadyDriveAsPath_ThrowsIOException C# (CSharp) Méthode

SubdirectoryOnNotReadyDriveAsPath_ThrowsIOException() private méthode

private SubdirectoryOnNotReadyDriveAsPath_ThrowsIOException ( ) : void
Résultat void
        public void SubdirectoryOnNotReadyDriveAsPath_ThrowsIOException()
        {
            var drive = IOServices.GetNotReadyDrive();
            if (drive == null)
            {
                Console.WriteLine("Skipping test. Unable to find a not-ready drive, such as CD-Rom with no disc inserted.");
                return;
            }

            // 'Device is not ready'
            Assert.Throws<IOException>(() =>
            {
                Create(Path.Combine(drive, "Subdirectory"));
            });
        }
Directory_CreateDirectory