public void ReturnsCorrectStringForDirectoryPath(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.String("A"); // Then Assert.IsInstanceOf <string>(result); Assert.AreEqual(expected, result); }
public string String(string key, string defaultValue = null) => _metadata.String(key, defaultValue);