public void EmptyQueryIsAppendedCorrect() { string baseUri = "http://sonarqube.test.de/"; string query = "key=value"; string alsoToAppend = ""; SqProjectUriBuilder uri = new SqProjectUriBuilder(baseUri); uri.AppendToQuery(query); uri.AppendToQuery(alsoToAppend); Assert.AreEqual(baseUri + "api/projects/index" + "?" + query, uri.GetSqUri().ToString()); }
public void AreMultipleQuerysAppendedCorrect() { string baseUri = "http://sonarqube.test.de/"; string query = "key=value"; string alsoToAppend = "anotherKey=anotherValue"; SqProjectUriBuilder uri = new SqProjectUriBuilder(baseUri); uri.AppendToQuery(query); uri.AppendToQuery(alsoToAppend); Assert.AreEqual(baseUri + "api/projects/index" + "?" + query + "&" + alsoToAppend, uri.GetSqUri().ToString()); }