public void SonarQubeServiceWrapper_CreateRequestUrl_HostNameAndPathBaseAddress()
        {
            // Act
            var result = SonarQubeServiceWrapper.CreateRequestUrl(
                client: CreateClientWithAddress("http://hostname/and/path/"),
                apiUrl: "foo/bar/baz");

            // Verify
            Assert.AreEqual("http://hostname/and/path/foo/bar/baz", result.ToString(), "Unexpected request URL for base address with host name and path");
        }
        public void SonarQubeServiceWrapper_CreateRequestUrl_LeadingAndTrailingSlashes()
        {
            using (new AssertIgnoreScope())
            {
                // Test case 1: base => no slash; api => with slash
                // Act
                var result1 = SonarQubeServiceWrapper.CreateRequestUrl(
                    client: CreateClientWithAddress("http://localhost/no/trailing/slash"),
                    apiUrl: "/has/starting/slash");

                // Verify
                Assert.AreEqual("http://localhost/no/trailing/slash/has/starting/slash", result1.ToString());

                // Test case 2: base => with slash; api => no slash
                // Act
                var result2 = SonarQubeServiceWrapper.CreateRequestUrl(
                    client: CreateClientWithAddress("http://localhost/with/trailing/slash/"),
                    apiUrl: "no/starting/slash");

                // Verify
                Assert.AreEqual("http://localhost/with/trailing/slash/no/starting/slash", result2.ToString());

                // Test case 3: base => no slash; api => no slash
                // Act
                var result3 = SonarQubeServiceWrapper.CreateRequestUrl(
                    client: CreateClientWithAddress("http://localhost/no/trailing/slash"),
                    apiUrl: "no/starting/slash");

                // Verify
                Assert.AreEqual("http://localhost/no/trailing/slash/no/starting/slash", result3.ToString());

                // Test case 3: base => with slash; api => with slash
                // Act
                var result4 = SonarQubeServiceWrapper.CreateRequestUrl(
                    client: CreateClientWithAddress("http://localhost/with/trailing/slash/"),
                    apiUrl: "/with/starting/slash");

                // Verify
                Assert.AreEqual("http://localhost/with/trailing/slash/with/starting/slash", result4.ToString());
            }
        }