Exemple #1
0
        public void GetQueuesTest()
        {
            // TODO: add unit test for the method 'GetQueues'
            int?   pageSize   = null; // TODO: replace null with proper value
            int?   pageNumber = null; // TODO: replace null with proper value
            string sortBy     = null; // TODO: replace null with proper value
            string name       = null; // TODO: replace null with proper value
            bool?  active     = null; // TODO: replace null with proper value
            var    response   = instance.GetQueues(pageSize, pageNumber, sortBy, name, active);

            Assert.IsInstanceOf <QueueEntityListing> (response, "response is QueueEntityListing");
        }
        public void getQueues()
        {
            try
            {
                /*
                 * var client = new RestClient("https://api.ininsca.com/api/v2/routing/queues");
                 * var request = new RestRequest(Method.GET);
                 * request.AddHeader("postman-token", "4fe9c331-3f04-c209-6269-537b27bbc5f0");
                 * request.AddHeader("cache-control", "no-cache");
                 * request.AddHeader("authorization", "Bearer 0PmmyDJOka3rSK6MPxyT7_7519dC-5Gs7J0mkDHoBhMi3atbI2Y_5RUJg-J3_bZwhiWQ7O3vmTvAKdeelbTw9Q");
                 * request.AddHeader("content-type", "application/json");
                 * IRestResponse response = client.Execute(request);
                 */



                Configuration.Default.AccessToken = "Bearer tGTVtwBo6hcm3m376LQKoIYsSi1RvaOavCdp-Ui5-dedf-l7JeLtXH2PkQXNBo5C8eAqh90ETmqAkNw0umVcSg";

                Configuration.Default.AddDefaultHeader("postman-token", "4fe9c331-3f04-c209-6269-537b27bbc5f0");
                Configuration.Default.AddDefaultHeader("content-type", "application/json");



                var api        = new RoutingApi();
                var pageSize   = 25;
                var pageNumber = 1;
                var sortBy     = "";
                var name       = "";
                var active     = true;

                QueueEntityListing result = api.GetQueues(pageSize, pageNumber, sortBy, name, active);

                log.Info("execute getQueues");
            }
            catch (Exception ex)
            {
                log.Error("error " + ex.Message);
            }
        }