Пример #1
0
            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);
            }
Пример #2
0
 public string String(string key, string defaultValue = null) => _metadata.String(key, defaultValue);