=begin
#qTest Manager API Version 8.6 - 9.1

#qTest Manager API Version 8.6 - 9.1

OpenAPI spec version: 8.6 - 9.1

Generated by: https://github.com/swagger-api/swagger-codegen.git

=end

require 'spec_helper'
require 'json'

# Unit tests for SwaggerClient::SearchApi
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
# Please update as you see appropriate
describe 'SearchApi' do
  before do
    # run before each test
    @instance = SwaggerClient::SearchApi.new
  end

  after do
    # run after each test
  end

  describe 'test an instance of SearchApi' do
    it 'should create an instact of SearchApi' do
      expect(@instance).to be_instance_of(SwaggerClient::SearchApi)
    end
  end

  # unit tests for query_histories
  # Queries objects&#39; histories
  # To query histories of Requirements, Test Cases, Test Runs and &lt;em&gt;internal&lt;/em&gt; Defects  &lt;strong&gt;qTest Manager version:&lt;/strong&gt; 7.6+
  # @param project_id ID of the project
  # @param body &lt;em&gt;object_type (required):&lt;/em&gt; valid values include &lt;em&gt;requirements&lt;/em&gt;, &lt;em&gt;test-cases&lt;/em&gt;, &lt;em&gt;test-runs&lt;/em&gt;, or &lt;em&gt;defects&lt;/em&gt;  &lt;em&gt;fields:&lt;/em&gt; specify which object fields you want to include in the response. If you omit it or specify an asterisk (*), all fields are included  &lt;em&gt;object_query:&lt;/em&gt; specify a structured query to search for qTest objects. &lt;br/&gt;Refer to attribute &lt;em&gt;query&lt;/em&gt; in the Request Body of &lt;em&gt;Queries Objects&lt;/em&gt; API  &lt;em&gt;query:&lt;/em&gt; specify a structured query to retrieve histories of objects specified in attribute &lt;em&gt;object_query&lt;/em&gt; above. You can use operators &lt;em&gt;and&lt;/em&gt; and &lt;em&gt;or&lt;/em&gt; to combine multiple criteria. Only these 2 criteria are supported:  &lt;br/&gt;i) &lt;em&gt;created:&lt;/em&gt; it can be used for querying by updated date of the object. Its values need to be in ISO Date format. Applicable operator include: &#x3D;, &lt;&gt;, &lt;&#x3D; and &gt;&#x3D;  &lt;br/&gt;ii) &lt;em&gt;author:&lt;/em&gt; it can be used for querying by ID of the users who made the update. Applicable operators include: &#x3D; and &lt;&gt;
  # @param [Hash] opts the optional parameters
  # @option opts [Integer] :page_size The result is paginated. By the default, the number of objects in each page is 100 if this is omitted. You can specify your custom number (up to 999) in this parameter
  # @option opts [Integer] :page By default the first page is returned but you can specify any page number to retrieve objects
  # @return [ArtifactHistoryResource]
  describe 'query_histories test' do
    it "should work" do
      # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  # unit tests for search
  # Queries Comments
  # To search for comments  &lt;strong&gt;qTest Manager version:&lt;/strong&gt; 7.6+
  # @param project_id ID of the project
  # @param body &lt;em&gt;object_type (required):&lt;/em&gt; valid values include requirements, test-cases, test-runs and defects  &lt;em&gt;object:&lt;/em&gt; ID of the object from which you want to retrieve comments  &lt;em&gt;authors:&lt;/em&gt; ID of the user who made the comments  &lt;em&gt;start:&lt;/em&gt; This value needs to be in ISO Date format  &lt;em&gt;end:&lt;/em&gt; This value needs to be in ISO Date format
  # @param [Hash] opts the optional parameters
  # @option opts [Integer] :page By default the first page is returned but you can specify any page number to retrieve objects
  # @option opts [Integer] :page_size The result is paginated. By the default, the number of objects in each page is 100 if this is omitted. You can specify your custom number (up to 999) in this parameter
  # @return [QueryCommentResource]
  describe 'search test' do
    it "should work" do
      # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  # unit tests for search_0
  # Queries objects
  # This API mimics the Data Query function of qTest Manager web app. It provides the capability to query Requirements, Test Cases, Test Runs and &lt;em&gt;internal&lt;/em&gt; Defects
  # @param project_id ID of the project
  # @param body &lt;em&gt;object_type (required):&lt;/em&gt; Its value can be &lt;em&gt;requirements&lt;/em&gt;, &lt;em&gt;test-cases&lt;/em&gt;, &lt;em&gt;test-runs&lt;/em&gt;, or &lt;em&gt;defects&lt;/em&gt;  &lt;em&gt;fields:&lt;/em&gt; specify which object fields you want to include in the response. If you omit it or specify an asterisk (*), all fields are included  &lt;em&gt;query:&lt;/em&gt; specify a structured query to search for qTest Manager objects. Basically, you can use the Query Summary text in qTest web app as in the below image for this attribute  &lt;strong&gt;IMPORTANT:&lt;/strong&gt; When using Query Summary to specify the query, you will need to modify the Query Summary in some special cases as below:  - If there are spaces in the criteria name, put it between &#39;&#39; (single quotation marks)  - There need to be spaces between a criteria, operator and value  - You can use field name or field ID in the query  - You can use a value text or its ID in the query  - For date time typed fields: you will need to convert the values to ISO Date Time format  - &lt;em&gt;Affected Release/Build:&lt;/em&gt; if you want to query Defects by their affected release, use &lt;em&gt;Affected Release&lt;/em&gt; instead. Otherwise, use &lt;em&gt;Affected Build&lt;/em&gt;  - &lt;em&gt;Target Release/Build:&lt;/em&gt; similarly, you will need to break it down to &lt;em&gt;Target Release&lt;/em&gt; and &lt;em&gt;Target Build&lt;/em&gt;  - &lt;em&gt;Fixed Release/Build:&lt;/em&gt; similarly, you will need to break it down to &lt;em&gt;Fixed Release&lt;/em&gt; and &lt;em&gt;Fixed Build&lt;/em&gt;  - Subscriber: modify it to Subscribers and use user ID instead of username to query  - You will need to use object Id when querying using these fields: Id, Affected Release, Affected Build, Target Release, Target Build, Fixed Release and Fixed Build  - Modify operator &lt;em&gt;contains&lt;/em&gt; to &lt;em&gt;~&lt;/em&gt;, and modify operator &lt;em&gt;not contains&lt;/em&gt; to &lt;em&gt;!~&lt;/em&gt;. Eg: instead of &lt;em&gt;Name contains \&quot;login\&quot;&lt;/em&gt;, change it to &lt;em&gt;Name ~ \&quot;login\&quot;&lt;/em&gt;  - Modify operator &lt;em&gt;is not empty&lt;/em&gt; to &lt;strong&gt;is &#39;not empty&#39;&lt;/strong&gt;. Eg: Name is &#39;not empty&#39;
  # @param [Hash] opts the optional parameters
  # @option opts [Integer] :page_size The result is paginated. By the default, the number of objects in each page is 100 if this is omitted. You can specify your custom number (up to 999) in this parameter
  # @option opts [Integer] :page By default the first page is returned but you can specify any page number to retrieve objects
  # @return [PagedResource]
  describe 'search_0 test' do
    it "should work" do
      # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

end
