コード例 #1
0
            public void ShouldCombinePaths(string first, string second, string expected)
            {
                // Given
                DirectoryPath path = new DirectoryPath(first);

                // When
                FilePath result = path.GetFilePath(new FilePath(second));

                // Then
                Assert.AreEqual(expected, result.FullPath);
            }
コード例 #2
0
            public void ShouldThrowIfPathIsNull()
            {
                // Given
                DirectoryPath path = new DirectoryPath("assets");

                // When
                TestDelegate test = () => path.GetFilePath(null);

                // Then
                Assert.Throws<ArgumentNullException>(test);
            }
コード例 #3
0
ファイル: DirectoryPathTests.cs プロジェクト: ibebbs/Wyam
            public void FileProviderFromDirectoryPathIsUsed(string firstProvider, string firstPath, string secondProvider, string secondPath)
            {
                // Given
                DirectoryPath path = new DirectoryPath(firstProvider == null ? null : new Uri(firstProvider), firstPath);

                // When
                FilePath result = path.GetFilePath(new FilePath(secondProvider == null ? null : new Uri(secondProvider), secondPath));

                // Then
                Assert.AreEqual(firstProvider == null ? null : new Uri(firstProvider), result.FileProvider);
            }