[PlatformSpecific(PlatformID.Windows)] // UNC paths public void UncPathWithoutShareNameAsPath_ReturnsFalse() { Assert.All((IOInputs.GetUncPathsWithoutShareName()), (component) => { Assert.False(Exists(component)); }); }
[PlatformSpecific(PlatformID.Windows)] // UNC shares public void UncPathWithoutShareNameAsPath_ThrowsArgumentException() { var paths = IOInputs.GetUncPathsWithoutShareName(); foreach (var path in paths) { Assert.Throws <ArgumentException>(() => Create(path)); } }
[PlatformSpecific(PlatformID.Windows)] // UNC paths public static void Exists_UncPathWithoutShareNameAsPath_ReturnsFalse() { var paths = IOInputs.GetUncPathsWithoutShareName(); foreach (string path in paths) { bool result = Directory.Exists(path); Assert.False(result, path); } }
[PlatformSpecific(PlatformID.Windows)] // UNC shares public static void CreateDirectory_UncPathWithoutShareNameAsPath_ThrowsArgumentException() { var paths = IOInputs.GetUncPathsWithoutShareName(); foreach (var path in paths) { Assert.Throws <ArgumentException>(() => // BUG 995784: Not setting the parameter name { Directory.CreateDirectory(path); }); } }