// 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 WorkflowTasksListTests extends PurviewWorkflowClientTestBase {
    @Test
    public void testWorkflowTasksListTests() {
        RequestOptions requestOptions =
                new RequestOptions()
                        .addQueryParam("maxpagesize", "1000")
                        .addQueryParam("orderby", "createdTime desc")
                        .addQueryParam("timeWindow", "30d")
                        .addQueryParam("viewMode", "sent");
        PagedIterable<BinaryData> response = purviewWorkflowClient.listWorkflowTasks(requestOptions);
        Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode());
    }
}
