# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer
import functools
from specs.azure.clientgenerator.core.clientinitialization.default import (
    HeaderParamClient,
    MixedParamsClient,
    MultipleParamsClient,
    ParamAliasClient,
    PathParamClient,
    QueryParamClient,
)


class HeaderParamClientTestBase(AzureRecordedTestCase):

    def create_client(self, endpoint):
        credential = self.get_credential(HeaderParamClient)
        return self.create_client_from_credential(
            HeaderParamClient,
            credential=credential,
            endpoint=endpoint,
        )


HeaderParamPreparer = functools.partial(
    PowerShellPreparer, "headerparam", headerparam_endpoint="https://fake_headerparam_endpoint.com"
)


class MultipleParamsClientTestBase(AzureRecordedTestCase):

    def create_client(self, endpoint):
        credential = self.get_credential(MultipleParamsClient)
        return self.create_client_from_credential(
            MultipleParamsClient,
            credential=credential,
            endpoint=endpoint,
        )


MultipleParamsPreparer = functools.partial(
    PowerShellPreparer, "multipleparams", multipleparams_endpoint="https://fake_multipleparams_endpoint.com"
)


class MixedParamsClientTestBase(AzureRecordedTestCase):

    def create_client(self, endpoint):
        credential = self.get_credential(MixedParamsClient)
        return self.create_client_from_credential(
            MixedParamsClient,
            credential=credential,
            endpoint=endpoint,
        )


MixedParamsPreparer = functools.partial(
    PowerShellPreparer, "mixedparams", mixedparams_endpoint="https://fake_mixedparams_endpoint.com"
)


class PathParamClientTestBase(AzureRecordedTestCase):

    def create_client(self, endpoint):
        credential = self.get_credential(PathParamClient)
        return self.create_client_from_credential(
            PathParamClient,
            credential=credential,
            endpoint=endpoint,
        )


PathParamPreparer = functools.partial(
    PowerShellPreparer, "pathparam", pathparam_endpoint="https://fake_pathparam_endpoint.com"
)


class ParamAliasClientTestBase(AzureRecordedTestCase):

    def create_client(self, endpoint):
        credential = self.get_credential(ParamAliasClient)
        return self.create_client_from_credential(
            ParamAliasClient,
            credential=credential,
            endpoint=endpoint,
        )


ParamAliasPreparer = functools.partial(
    PowerShellPreparer, "paramalias", paramalias_endpoint="https://fake_paramalias_endpoint.com"
)


class QueryParamClientTestBase(AzureRecordedTestCase):

    def create_client(self, endpoint):
        credential = self.get_credential(QueryParamClient)
        return self.create_client_from_credential(
            QueryParamClient,
            credential=credential,
            endpoint=endpoint,
        )


QueryParamPreparer = functools.partial(
    PowerShellPreparer, "queryparam", queryparam_endpoint="https://fake_queryparam_endpoint.com"
)
