예제 #1
0
            public void ReturnsCorrectFilePathForFilePath(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 FilePath(path)) });
                object result = metadata.FilePath("A");

                // Then
                Assert.IsInstanceOf <FilePath>(result);
                Assert.AreEqual(expected, ((FilePath)result).FullPath);
            }
예제 #2
0
파일: Document.cs 프로젝트: cederlof/Wyam
 public FilePath FilePath(string key, FilePath defaultValue = null) => _metadata.FilePath(key, defaultValue);