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

package versioning.added.generated;

// The Java test files under 'generated' package are generated for your reference.
// If you wish to modify these files, please copy them out of the 'generated' package, and modify there.
// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test.

import com.azure.core.http.policy.HttpLogDetailLevel;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.test.TestMode;
import com.azure.core.test.TestProxyTestBase;
import com.azure.core.util.Configuration;
import versioning.added.AddedClient;
import versioning.added.AddedClientBuilder;
import versioning.added.InterfaceV2Client;
import versioning.added.models.Versions;

class AddedClientTestBase extends TestProxyTestBase {
    protected AddedClient addedClient;

    protected InterfaceV2Client interfaceV2Client;

    @Override
    protected void beforeTest() {
        AddedClientBuilder addedClientbuilder
            = new AddedClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint"))
                .version(Versions.fromString(Configuration.getGlobalConfiguration().get("VERSION", "version")))
                .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
                .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            addedClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        addedClient = addedClientbuilder.buildClient();

        AddedClientBuilder interfaceV2Clientbuilder
            = new AddedClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint"))
                .version(Versions.fromString(Configuration.getGlobalConfiguration().get("VERSION", "version")))
                .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
                .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            interfaceV2Clientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        interfaceV2Client = interfaceV2Clientbuilder.buildInterfaceV2Client();

    }
}
