示例#1
0
 public void GetLogicalFolderNames_NullAsMetadata_ThrowsArgumentNull()
 {
     Assert.Throws <ArgumentNullException>("metadata", () =>
     {
         FileItemServices.GetLogicalFolderNames("basePath", "fullPath", (IImmutableDictionary <string, string>)null);
     });
 }
示例#2
0
 public void GetLogicalFolderNames_EmptyAsFullPath_ThrowsArgument()
 {
     Assert.Throws <ArgumentException>("fullPath", () =>
     {
         FileItemServices.GetLogicalFolderNames("basePath", string.Empty, ImmutableDictionary <string, string> .Empty);
     });
 }
示例#3
0
 public void GetLogicalFolderNames_NullAsBasePath_ThrowsArgumentNull()
 {
     Assert.Throws <ArgumentNullException>("basePath", () =>
     {
         FileItemServices.GetLogicalFolderNames((string)null, "fullPath", ImmutableDictionary <string, string> .Empty);
     });
 }
示例#4
0
        public void GetLogicalFolderNames_Returns(string basePath, string fullPath, string link, params string[] expected)
        {
            var metadata = ImmutableDictionary <string, string> .Empty;

            if (link != null)
            {
                metadata = metadata.SetItem(Compile.LinkProperty, link);
            }

            var result = FileItemServices.GetLogicalFolderNames(basePath, fullPath, metadata);

            Assert.Equal(expected, result);
        }