@@ -0,0 +1,1916 @@
+package org.rundeck.api;%0A%0Aimport junit.framework.Assert;%0Aimport org.junit.Test;%0Aimport org.rundeck.api.query.ExecutionQuery;%0A%0Aimport java.util.Arrays;%0Aimport java.util.Date;%0A%0A/**%0A * ExecutionQueryParametersTest is ...%0A *%0A * @author Greg Schueler %3Cgreg@simplifyops.com%3E%0A * @since 2014-11-07%0A */%0Apublic class ExecutionQueryParametersTest %7B%0A%0A    @Test%0A    public void stringParameter() %7B%0A        ExecutionQuery.Builder description = ExecutionQuery.builder().description(%22a description%22);%0A        ExecutionQueryParameters executionQueryParameters = new ExecutionQueryParameters(%0A                description.build()%0A        );%0A        ApiPathBuilder param = new ApiPathBuilder(%22%22).param(executionQueryParameters);%0A        Assert.assertEquals(%22?descFilter=a+description%22, param.toString());%0A    %7D%0A    @Test%0A    public void listParameter() %7B%0A        ExecutionQuery.Builder description = ExecutionQuery.builder().excludeJobList(%0A                Arrays.asList(%0A                        %22a%22,%0A                        %22b%22%0A                )%0A        );%0A        ExecutionQueryParameters executionQueryParameters = new ExecutionQueryParameters(%0A                description.build()%0A        );%0A        ApiPathBuilder param = new ApiPathBuilder(%22%22).param(executionQueryParameters);%0A        Assert.assertEquals(%22?excludeJobListFilter=a&excludeJobListFilter=b%22, param.toString());%0A    %7D%0A    @Test%0A    public void dateParameter() %7B%0A        ExecutionQuery.Builder description = ExecutionQuery.builder().end(%0A                new Date(1347581178168L)%0A        );%0A        ExecutionQueryParameters executionQueryParameters = new ExecutionQueryParameters(%0A                description.build()%0A        );%0A        ApiPathBuilder param = new ApiPathBuilder(%22%22).param(executionQueryParameters);%0A        //nb: timezone should be GMT%0A        //2012-09-14T00:06:18Z%0A        Assert.assertEquals(%22?end=2012-09-14T00%253A06%253A18Z%22, param.toString());%0A    %7D%0A%7D%0A

Test query parameter generation for date strings