Exemplo n.º 1
0
        public void TryParseRemoteUrl_returns_the_expected_GitHubProjectInfo(string url, string host, string @namespace, string projectName)
        {
            // ARRANGE
            var expected = new GitLabProjectInfo(host, @namespace, projectName);
            // ACT
            var success = GitLabUrlParser.TryParseRemoteUrl(url, out var projectInfo);

            // ASSERT
            Assert.True(success);
            Assert.Equal(expected, projectInfo);
        }
Exemplo n.º 2
0
        public void ParseRemoteUrl_returns_the_expected_GitLabProjectInfo(string remoteUrl, string host, string @namespace, string proejctName)
        {
            // ARRANGE
            var expected = new GitLabProjectInfo(host, @namespace, proejctName);

            // ACT
            var actual = GitLabUrlParser.ParseRemoteUrl(remoteUrl);

            // ASSERT
            Assert.Equal(expected, actual);
        }
Exemplo n.º 3
0
 [InlineData("http://gitlab.com/user")]          // missing project name
 public void TryParseRemoteUrl_returns_false_for_invalid_input(string url)
 {
     Assert.False(GitLabUrlParser.TryParseRemoteUrl(url, out var uri));
 }
Exemplo n.º 4
0
 [InlineData("http://gitlab.com/user")]          // missing project name
 public void ParseRemoteUrl_throws_ArgumentException_for_invalid_input(string url)
 {
     Assert.ThrowsAny <ArgumentException>(() => GitLabUrlParser.ParseRemoteUrl(url));
 }