# coding: utf-8

"""
    iEngage 2.0 API

    This API enables Intelligent Engagement for your Business. iEngage is a platform that combines process, augmented intelligence and rewards to help you intelligently engage customers.

    OpenAPI spec version: 2.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

from __future__ import absolute_import

import os
import sys
import unittest

import iengage_client
from iengage_client.rest import ApiException
from iengage_client.apis.group_api import GroupApi
from iengage_client.models.group import Group


class TestGroupApi(unittest.TestCase):
    """ GroupApi unit test stubs """

    def setUp(self):
        iengage_client.configuration.access_token = None
        self.api = iengage_client.apis.group_api.GroupApi()

    def tearDown(self):
        pass

    def test_create_group(self):
        """
        Test case for create_group

        Create group
        """
        requesterId = None
        clientToken = None
        g = Group()
        g.association =533856
        g.group_name = "xyz group"
        g.description = "xyz group description"
        g.manager_id = 532893

        print(self.api.create_group(requesterId,clientToken,body=g))
        pass

    def test_delete_group(self):
        """
        Test case for delete_group

        Delete group
        """
        gid = 651584
        requesterId = None
        clientToken = None
        print(self.api.delete_group(gid,requesterId,clientToken))
        pass

    def test_follow_group(self):
        """
        Test case for follow_group

        Follow group
        """
        requesterId = None
        clientToken = None
        gid = 651584
        print(self.api.follow_group(gid,requesterId,clientToken))
        pass

    def test_get_group_followers(self):
        """
        Test case for get_group_followers

        Get the list of followers for the group
        """
        requesterId = None
        clientToken = None
        gid = 651584
        start = 0
        end = 10
        print(self.api.get_group_followers(gid,start,end,requesterId,clientToken))
        pass

    def test_get_group_ideas(self):
        """
        Test case for get_group_ideas

        Get list of all ideas in a group
        """
        requesterId = None
        clientToken = None
        gid = 651584
        start = 0
        end = 10
        print(self.api.get_group_ideas(gid,start,end,requesterId,clientToken))
        pass

    def test_get_groups(self):
        """
        Test case for get_groups

        Get the list of groups visible for user
        """
        requesterId = None
        clientToken = None
        start = 0
        end =10
        print(self.api.get_groups(start,end,requesterId,clientToken))
        pass

    def test_get_recommendation_group(self):
        """
        Test case for get_recommendation_group

        Get list of recommended groups
        """
        requesterId = None
        clientToken = None
        start = 0
        end = 10
        print(self.api.get_recommendation_group(start,end,requesterId,clientToken))
        pass

    def test_get_user_following_groups(self):
        """
        Test case for get_user_following_groups

        Get list of groups that a user is following
        """
        requesterId = None
        clientToken = None
        uid =532893
        start = 0
        end = 10
        print(self.api.get_user_following_groups(uid,start,end,requesterId,clientToken))
        pass

    def test_search_groups(self):
        """
        Test case for search_groups

        Get list of matching groups
        """
        requesterId = None
        clientToken = None
        query = "Hello"
        start = 0
        end = 10
        print(self.api.search_groups(query,start,end,requesterId,clientToken))
        pass

    def test_unfollow_group(self):
        """
        Test case for unfollow_group

        Unfollow group
        """
        requesterId = None
        clientToken = None
        gid = 651584
        print(self.api.unfollow_group(gid,requesterId,clientToken))
        pass

    def test_update_group(self):
        """
        Test case for update_group

        Update group
        """
        requesterId = None
        clientToken = None
        gid = 651584
        gtitle = "xyz group"
        gdesc = "new xyz description"
        print(self.api.update_group(gid,gtitle,gdesc,requesterId,clientToken))
        pass


if __name__ == '__main__':
    unittest.main()
