Exemplo n.º 1
0
        public void TryParseRemoteUrl_returns_the_expected_GitHubProjectInfo(string url, string host, string owner, string repository)
        {
            // ARRANGE

            // ACT
            var success = GitHubUrlParser.TryParseRemoteUrl(url, out var projectInfo);

            // ASSERT
            Assert.True(success);
            Assert.NotNull(projectInfo);
            Assert.Equal(host, projectInfo !.Host);
            Assert.Equal(owner, projectInfo.Owner);
            Assert.Equal(repository, projectInfo.Repository);
        }
Exemplo n.º 2
0
 [InlineData("ftp://github.com/owner/repo.git")]               // unsupported scheme
 public void TryParseRemoteUrl_returns_false_for_invalid_input(string url)
 {
     Assert.False(GitHubUrlParser.TryParseRemoteUrl(url, out var uri));
 }