public void GetClient_returns_the_expected_client(string hostName, string expectedHostUrl)
        {
            // ARRANGE
            var sut = new GitLabClientFactory(new ChangeLogConfiguration());

            // ACT
            var client = sut.CreateClient(hostName);

            // ASSERT
            Assert.Equal(expectedHostUrl, client.HostUrl);
        }
Esempio n. 2
0
        public void CreateClient_succeeds_if_an_access_token_is_supplies()
        {
            // ARRANGE
            var sut = new GitLabClientFactory();

            // ACT
            var client = sut.CreateClient("gitlab.com", accessToken: "00000000000000000000");

            // ASSERT
            Assert.NotNull(client);
        }
Esempio n. 3
0
        public void CreateClient_succeeds_if_no_access_token_is_configured(string accessToken)
        {
            // ARRANGE
            var sut = new GitLabClientFactory();

            // ACT
            var client = sut.CreateClient("gitlab.com", accessToken);

            // ASSERT
            Assert.NotNull(client);
        }
Esempio n. 4
0
        public void GetClient_returns_the_expected_client(string hostName, string expectedHostUrl)
        {
            // ARRANGE
            var sut = new GitLabClientFactory();

            // ACT
            var client = sut.CreateClient(hostName, null);

            // ASSERT
            client.HostUrl.Should().Be(expectedHostUrl);
        }
        public void CreateClient_succeeds_if_no_access_token_is_configured(string accessToken)
        {
            // ARRANGE
            var configuration = new ChangeLogConfiguration();

            configuration.Integrations.GitLab.AccessToken = accessToken;

            var sut = new GitLabClientFactory(configuration);

            // ACT
            var client = sut.CreateClient("gitlab.com");

            // ASSERT
            Assert.NotNull(client);
        }