예제 #1
0
    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());
    }
예제 #2
0
    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());
    }