コード例 #1
0
        public void Should_get_link_definitions_When_no_remote_url_provided()
        {
            var externalLinkDefinitions = new GitHubExternalLinkDefinitionExtractor().GetDefinitions(null);

            externalLinkDefinitions.Should().HaveCount(3);
            foreach (ExternalLinkDefinition externalLinkDefinition in externalLinkDefinitions)
            {
                externalLinkDefinition.LinkFormats.Should().HaveCountGreaterOrEqualTo(1);
                foreach (ExternalLinkFormat externalLinkFormat in externalLinkDefinition.LinkFormats)
                {
                    externalLinkFormat.Format.Should().Contain("ORGANIZATION_NAME").And.Contain("REPO_NAME");
                }
            }
        }
コード例 #2
0
        public void Should_get_link_definitions(string url)
        {
            var externalLinkDefinitions = new GitHubExternalLinkDefinitionExtractor().GetDefinitions(url);

            externalLinkDefinitions.Should().HaveCount(3);
            foreach (ExternalLinkDefinition externalLinkDefinition in externalLinkDefinitions)
            {
                externalLinkDefinition.LinkFormats.Should().HaveCountGreaterOrEqualTo(1);
                foreach (ExternalLinkFormat externalLinkFormat in externalLinkDefinition.LinkFormats)
                {
                    externalLinkFormat.Format.Should().Contain("owner").And.Contain("repo");
                }
            }
        }