// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.analytics.purview.workflow;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.util.BinaryData;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class WorkflowRunsListTests extends PurviewWorkflowClientTestBase {
    @Test
    public void testWorkflowRunsListTests() {
        RequestOptions requestOptions =
                new RequestOptions()
                        .addQueryParam("maxpagesize", "1000")
                        .addQueryParam("orderby", "startTime desc")
                        .addQueryParam("timeWindow", "30d");
        PagedIterable<BinaryData> response = purviewWorkflowClient.listWorkflowRuns(requestOptions);
        Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode());
    }
}
