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

            // ACT
            var projectInfo = GitHubUrlParser.ParseRemoteUrl(url);

            // ASSERT
            Assert.NotNull(projectInfo);
            Assert.Equal(host, projectInfo.Host);
            Assert.Equal(owner, projectInfo.Owner);
            Assert.Equal(repository, projectInfo.Repository);
        }
Ejemplo 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));
 }
Ejemplo n.º 3
0
 [InlineData("ftp://github.com/owner/repo.git")]               // unsupported scheme
 public void ParseRemoteUrl_throws_ArgumentException_for_invalid_input(string url)
 {
     Assert.ThrowsAny <ArgumentException>(() => GitHubUrlParser.ParseRemoteUrl(url));
 }