Пример #1
0
 [PlatformSpecific(PlatformID.Windows)] // UNC paths
 public void UncPathWithoutShareNameAsPath_ReturnsFalse()
 {
     Assert.All((IOInputs.GetUncPathsWithoutShareName()), (component) =>
     {
         Assert.False(Exists(component));
     });
 }
Пример #2
0
        [PlatformSpecific(PlatformID.Windows)] // UNC shares
        public void UncPathWithoutShareNameAsPath_ThrowsArgumentException()
        {
            var paths = IOInputs.GetUncPathsWithoutShareName();

            foreach (var path in paths)
            {
                Assert.Throws <ArgumentException>(() => Create(path));
            }
        }
Пример #3
0
    [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);
        }
    }
Пример #4
0
    [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);
            });
        }
    }