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); }
public void ShouldThrowIfPathIsNull() { // Given DirectoryPath path = new DirectoryPath("assets"); // When TestDelegate test = () => path.GetFilePath(null); // Then Assert.Throws<ArgumentNullException>(test); }
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); }