public void ReturnsCorrectDirectoryPathForDirectoryPath(string path, string expected) { // Given MetadataDictionary initialMetadata = new MetadataDictionary(); MetadataStack metadata = new MetadataStack(initialMetadata); // When metadata = metadata.Clone(new[] { new KeyValuePair <string, object>("A", new DirectoryPath(path)) }); object result = metadata.DirectoryPath("A"); // Then Assert.IsInstanceOf <DirectoryPath>(result); Assert.AreEqual(expected, ((DirectoryPath)result).FullPath); }
public DirectoryPath DirectoryPath(string key, DirectoryPath defaultValue = null) => _metadata.DirectoryPath(key, defaultValue);