Пример #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);
        }