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

"""
    test_54545454

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

import jsonpickle
import dateutil.parser
from .controller_test_base import ControllerTestBase
from ..test_helper import TestHelper
from test_54545454.api_helper import APIHelper


class SimpleCalculatorControllerTests(ControllerTestBase):

    @classmethod
    def setUpClass(cls):
        super(SimpleCalculatorControllerTests, cls).setUpClass()
        cls.controller = cls.api_client.simple_calculator

    # Check if multiplication works
    def test_multiply(self):
        # Parameters for the API call
        options = {}
        options['operation'] = 'MULTIPLY'
        options['x'] = 4
        options['y'] = 5

        # Perform the API call through the SDK function
        result = self.controller.get_calculate(options)

        # Test response code
        self.assertEquals(self.response_catcher.response.status_code, 200)
        
        # Test whether the captured response is as we expected
        self.assertIsNotNone(result)
        self.assertEqual('20', self.response_catcher.response.raw_body)


