public void Should_Return_The_Correct_Link( string repositoryUrl, string filePath, int?line, int?endLine, int?column, int?endColumn, string commitId, string expectedLink) { // Given var issue = IssueBuilder .NewIssue("Foo", "ProviderTypeFoo", "ProviderNameFoo") .InFile(filePath, line, endLine, column, endColumn) .Create(); // When var result = new AzureDevOpsFileLinkSettingsBuilder(new Uri(repositoryUrl)) .Commit(commitId) .GetFileLink(issue); // Then result.ToString().ShouldBe(expectedLink); }
public void Should_Not_Throw_If_RootPath_Is_Null() { // Given string rootPath = null; // When var result = new AzureDevOpsFileLinkSettingsBuilder(new Uri("https://github.com")) .Branch("master") .WithRootPath(rootPath); // Then result.ShouldNotBeNull(); }
public void Should_Return_The_Correct_Link_For_RootPath( string repositoryUrl, string rootPath, string filePath, string branch, string expectedLink) { // Given var issue = IssueBuilder .NewIssue("Foo", "ProviderTypeFoo", "ProviderNameFoo") .InFile(filePath) .Create(); // When var result = new AzureDevOpsFileLinkSettingsBuilder(new Uri(repositoryUrl)) .Branch(branch) .WithRootPath(rootPath) .GetFileLink(issue); // Then result.ToString().ShouldBe(expectedLink); }