Exemplo n.º 1
0
        public TestOutcome DestroyTask(string filterstring)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Task";
            outcome.methodName = "TaskDestroy";
            try
            {
                TasksApi tasksApi               = new TasksApi(_url);
                IO.Swagger.Model.Task task      = TaskGenerator.GetFlatTask();
                JobReport             job       = tasksApi.TaskCreate(_session.SessionId, "all", task);
                JobReport             polledJob = JobHandler.pollJob(job, _session.SessionId, _url);
                FolderArray           tasks     = tasksApi.TaskSearch(_session.SessionId, "", true, 100, FilterGenerator.SimpleFilter("tasks.name", "like", filterstring + "%"));
                tasksApi.TaskDestroy(_session.SessionId, tasks[0].ReferenceId);
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
Exemplo n.º 2
0
        public TestOutcome SearchForTasks(string filterstring)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Task";
            outcome.methodName = "TaskSearch";
            try
            {
                TasksApi    tasksApi = new TasksApi(_url);
                FolderArray tasks    = tasksApi.TaskSearch(_session.SessionId, "", true, 100, FilterGenerator.SimpleFilter("tasks.name", "like", filterstring + "%"));
                foreach (Folder task in tasks)
                {
                    Console.WriteLine(task.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
Exemplo n.º 3
0
        public TestOutcome SearchParameters()
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "OutlineParameters";
            outcome.methodName = "OutlineParameterSearch";
            try
            {
                OutlineParametersApi  outlineParametersApi = new OutlineParametersApi(_url);
                OutlineParameterArray outlineParameters    = outlineParametersApi.OutlineParameterSearch(_session.SessionId, "main", FilterGenerator.SimpleFilter("name", "like", "c%"), 100);
                foreach (OutlineParameter op in outlineParameters)
                {
                    Console.WriteLine(op.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
Exemplo n.º 4
0
        public TestOutcome GetFolderBySearch()
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Folders";
            outcome.methodName = "FolderSearch";
            try
            {
                FoldersApi  foldersApi = new FoldersApi(_url);
                FolderArray folders    = foldersApi.FolderSearch(_session.SessionId, "", true, 100, FilterGenerator.SimpleFilter("_", "contains", "method"));
                foreach (Folder folder in folders)
                {
                    Console.WriteLine(folder.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
Exemplo n.º 5
0
        public TestOutcome SearchRequests(string filterstring)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Request";
            outcome.methodName = "RequestsSearch";
            try
            {
                RequestsApi requestsApi = new RequestsApi(_url);
                NamedArray  requests    = requestsApi.RequestsSearch(_session.SessionId, "all", FilterGenerator.SimpleFilter("name", "like", filterstring + "%"), 100);
                foreach (Named request in requests)
                {
                    Console.WriteLine(request.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
Exemplo n.º 6
0
        public TestOutcome GetQueriesByFilter(string filterstring)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Queries";
            outcome.methodName = "QueriesSearch";
            try
            {
                QueriesApi queriesApi = new QueriesApi(_url);
                NamedArray queries    = queriesApi.QueriesSearch(_session.SessionId, 100, FilterGenerator.SimpleFilter("name", "like", filterstring + "%"));
                foreach (Named query in queries)
                {
                    Console.WriteLine(query.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }