public void GetLogicalFolderNames_NullAsMetadata_ThrowsArgumentNull() { Assert.Throws <ArgumentNullException>("metadata", () => { FileItemServices.GetLogicalFolderNames("basePath", "fullPath", (IImmutableDictionary <string, string>)null); }); }
public void GetLogicalFolderNames_EmptyAsFullPath_ThrowsArgument() { Assert.Throws <ArgumentException>("fullPath", () => { FileItemServices.GetLogicalFolderNames("basePath", string.Empty, ImmutableDictionary <string, string> .Empty); }); }
public void GetLogicalFolderNames_NullAsBasePath_ThrowsArgumentNull() { Assert.Throws <ArgumentNullException>("basePath", () => { FileItemServices.GetLogicalFolderNames((string)null, "fullPath", ImmutableDictionary <string, string> .Empty); }); }
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); }