# -*- coding: utf-8 -*-

"""
coingeckoapiv3

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""

import json
import dateutil.parser

from tests.controllers.controller_test_base import ControllerTestBase
from tests.test_helper import TestHelper
from tests.http_response_catcher import HttpResponseCatcher
from coingeckoapiv3.api_helper import APIHelper
from coingeckoapiv3.controllers.finance_controller import FinanceController


class FinanceControllerTests(ControllerTestBase):

    @classmethod
    def setUpClass(cls):
        super(FinanceControllerTests, cls).setUpClass()
        cls.response_catcher = HttpResponseCatcher()
        cls.controller = FinanceController(cls.config, cls.response_catcher)

    # List all finance platforms
    def test_listallfinanceplatforms(self):
        # Parameters for the API call
        per_page = None
        page = None

        # Perform the API call through the SDK function
        self.controller.listallfinanceplatforms(per_page, page)

        # Test response code
        self.assertEquals(self.response_catcher.response.status_code, 200)

    # List all finance products
    def test_listallfinanceproducts(self):
        # Parameters for the API call
        per_page = None
        page = None
        start_at = None
        end_at = None

        # Perform the API call through the SDK function
        self.controller.listallfinanceproducts(per_page, page, start_at, end_at)

        # Test response code
        self.assertEquals(self.response_catcher.response.status_code, 200)

