public void ParseLinkWithEmptyRemotePart() { _linkDef = GitExtLinksParser.LoadFromXmlString(GetEmptyRemotePartXmlDef()).First(); _revision.Body = "Merge pull request #3657 from RussKie/tweak_FormRemotes_tooltips"; IEnumerable <GitExtLink> expectedLinks = new[] { new GitExtLink() { Caption = "Issue 3657", URI = "https://github.com/gitextensions/gitextensions/issues/3657" } }; var actualLinks = _linkDef.Parse(_revision, _remoteManager); actualLinks.Should().Equal(expectedLinks); }
public void ParseLinkWithEmptyRemotePart() { GitExtLinkDef linkDef = GitExtLinksParser.LoadFromXmlString(GetEmptyRemotePartXmlDef()).First(); GitRevision revision = new GitRevision(null, ""); revision.Body = "Merge pull request #3657 from RussKie/tweak_FormRemotes_tooltips"; IGitRemoteController remoteController = Substitute.For <IGitRemoteController>(); remoteController.Remotes.Returns(GetDefaultRemotes()); IEnumerable <GitExtLink> actualLinks = linkDef.Parse(revision, remoteController); IEnumerable <GitExtLink> expectedLinks = new GitExtLink[] { new GitExtLink() { Caption = "Issue 3657", URI = "https://github.com/gitextensions/gitextensions/issues/3657" } }; actualLinks.Should().Equal(expectedLinks); }
private static GitExtLinkDef GetGithubIssuesLinkDef() { return(GitExtLinksParser.LoadFromXmlString(GetGithubIssuesXmlDef()).First()); }