# coding: utf-8

"""
    VNS3 Controller API

    Cohesive networks VNS3 API providing complete control of your network's addresses, routes, rules and edge  # noqa: E501

    The version of the OpenAPI document: 4.8
    Contact: solutions@cohesive.net
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import pytest

import cohesivenet
from cohesivenet.api.vns3 import interfaces_api  # noqa: E501
from cohesivenet.rest import ApiException

from tests.openapi import generate_method_test
from tests.vns3.stub_data import InterfacesApiData


class TestInterfacesApi(object):
    """InterfacesApi unit test stubs"""

    def test_get_interfaces(self, rest_mocker, vns3_client, vns3_api_schema: dict):
        """Test case for get_interfaces

        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "get",
            "/interfaces",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.InterfaceListResponse,
        )(interfaces_api.get_interfaces)

    def test_get_system_interface_details(
        self, rest_mocker, vns3_client, vns3_api_schema: dict
    ):
        """Test case for get_system_interface_details

        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "get",
            "/interfaces/system/{interface_id}",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.InterfaceDetail,
        )(interfaces_api.get_system_interface_details)

    def test_get_system_interfaces(
        self, rest_mocker, vns3_client, vns3_api_schema: dict
    ):
        """Test case for get_system_interfaces
        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "get",
            "/interfaces/system",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.InterfaceListResponse,
        )(interfaces_api.get_system_interfaces)

    def test_post_create_system_interface(
        self, rest_mocker, vns3_client, vns3_api_schema: dict
    ):
        """Test case for post_create_system_interface
        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "post",
            "/interfaces/system",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.InterfaceDetail,
        )(interfaces_api.post_create_system_interface)

    def test_put_update_system_interface(
        self, rest_mocker, vns3_client, vns3_api_schema: dict
    ):
        """Test case for put_update_system_interface
        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "put",
            "/interfaces/system/{interface_id}",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.InterfaceDetail,
        )(interfaces_api.put_update_system_interface)

    def test_delete_system_interface(
        self, rest_mocker, vns3_client, vns3_api_schema: dict
    ):
        """Test case for delete_system_interface

        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "delete",
            "/interfaces/system/{interface_id}",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.InterfaceDetail,
        )(interfaces_api.delete_system_interface)

    def test_post_interfaces_action(
        self, rest_mocker, vns3_client, vns3_api_schema: dict
    ):
        """Test case for post_interfaces_action
        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "post",
            "/interfaces/action",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response_from_schema=True,
        )(interfaces_api.post_interfaces_action)

    def test_get_gre_interfaces(self, rest_mocker, vns3_client, vns3_api_schema: dict):
        """Test case for get_gre_interfaces
        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "get",
            "/interfaces/edge_gre",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.GREEndpointListResponse,
        )(interfaces_api.get_gre_interfaces)

    def test_get_gre_interface_details(
        self, rest_mocker, vns3_client, vns3_api_schema: dict
    ):
        """Test case for get_gre_interface_details

        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "get",
            "/interfaces/edge_gre/{interface_id}",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.GREEndpointDetail,
        )(interfaces_api.get_gre_interface_details)

    def test_delete_gre_interface(
        self, rest_mocker, vns3_client, vns3_api_schema: dict
    ):
        """Test case for delete_gre_interface

        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "delete",
            "/interfaces/edge_gre/{interface_id}",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.GREEndpointDetail,
        )(interfaces_api.delete_gre_interface)

    def test_post_create_gre_interface(
        self, rest_mocker, vns3_client, vns3_api_schema: dict
    ):
        """Test case for post_create_gre_interface
        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "post",
            "/interfaces/edge_gre",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.GREEndpointDetail,
        )(interfaces_api.post_create_gre_interface)

    def test_put_update_gre_interface(
        self, rest_mocker, vns3_client, vns3_api_schema: dict
    ):
        """Test case for put_update_gre_interface
        """
        generate_method_test(
            vns3_client,
            vns3_api_schema,
            "put",
            "/interfaces/edge_gre/{interface_id}",
            rest_mocker,
            mock_request_from_schema=True,
            mock_response=InterfacesApiData.GREEndpointDetail,
        )(interfaces_api.put_update_gre_interface)
