<?xml version="1.0" encoding="UTF-8"?>
<con:testCase id="a756ad09-2f16-41b1-a109-e4b1ad5d3597" discardOkResults="false" failOnError="true" failTestCaseOnErrors="true" keepSession="false" name="GetParameterGroup" searchProperties="true" timeout="0" xmlns:con="http://eviware.com/soapui/config">
  <con:settings>
    <con:setting id="a756ad09-2f16-41b1-a109-e4b1ad5d3597fileName">GetParameterGroup</con:setting>
  </con:settings>
  <con:testStep type="restrequest" name="login" id="63f98a79-0ebd-47c9-8065-410c888555c3">
    <con:settings/>
    <con:config service="TiEM UI API" resourcePath="/api/v1/user/login" methodName="POST" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <con:restRequest name="login" id="1462dff4-0950-4f59-a435-496c868230e2" mediaType="application/json" postQueryString="false">
        <con:settings>
          <con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting>
        </con:settings>
        <con:endpoint>http://172.16.4.134:4100</con:endpoint>
        <con:request>{
  "userName" : "admin",
  "userPassword" : "admin"
}</con:request>
        <con:originalUri>http://172.16.4.134/api/v1/user/login</con:originalUri>
        <con:assertion type="Valid HTTP Status Codes" id="155fd46f-3811-4c1a-b5f4-be86f7253481" name="Valid HTTP Status Codes">
          <con:settings/>
          <con:configuration>
            <codes>200</codes>
          </con:configuration>
        </con:assertion>
        <con:assertion type="DataAndMetadataAssertion" id="ebf7e076-3c4b-4a34-a5be-3427b03047aa" name="Smart Assertion">
          <con:configuration xsi:type="con:DataAndMetadataAssertion">
            <con:mode>Received Data</con:mode>
            <con:elements>
              <con:path>$['code']</con:path>
              <con:element>code</con:element>
              <con:operatorId>1</con:operatorId>
              <con:enabled>true</con:enabled>
              <con:expectedValue>0</con:expectedValue>
              <con:caseSensitive>true</con:caseSensitive>
              <con:numberType>true</con:numberType>
              <con:expectedDataType>2</con:expectedDataType>
            </con:elements>
            <con:elements>
              <con:path>$['message']</con:path>
              <con:element>message</con:element>
              <con:operatorId>1</con:operatorId>
              <con:enabled>true</con:enabled>
              <con:expectedValue>OK</con:expectedValue>
              <con:caseSensitive>true</con:caseSensitive>
              <con:numberType>false</con:numberType>
              <con:expectedDataType>1</con:expectedDataType>
            </con:elements>
            <con:elements>
              <con:path>$['data']['token']</con:path>
              <con:element>token</con:element>
              <con:operatorId>9</con:operatorId>
              <con:enabled>true</con:enabled>
              <con:expectedValue>f1101a5a-60e7-4425-b9f5-a58d52d16dd1</con:expectedValue>
              <con:caseSensitive>true</con:caseSensitive>
              <con:numberType>false</con:numberType>
              <con:expectedDataType>1</con:expectedDataType>
            </con:elements>
            <con:elements>
              <con:path>$['data']['userId']</con:path>
              <con:element>userId</con:element>
              <con:operatorId>9</con:operatorId>
              <con:enabled>true</con:enabled>
              <con:expectedValue>A7q4Z1P6SEyH9MGyVFMhkA</con:expectedValue>
              <con:caseSensitive>true</con:caseSensitive>
              <con:numberType>false</con:numberType>
              <con:expectedDataType>1</con:expectedDataType>
            </con:elements>
            <con:elements>
              <con:path>$['data']['tenantId']</con:path>
              <con:element>tenantId</con:element>
              <con:operatorId>1</con:operatorId>
              <con:enabled>true</con:enabled>
              <con:expectedValue>admin</con:expectedValue>
              <con:caseSensitive>true</con:caseSensitive>
              <con:numberType>false</con:numberType>
              <con:expectedDataType>1</con:expectedDataType>
            </con:elements>
            <con:originalMessage>{"code":0,"message":"OK","data":{"token":"f1101a5a-60e7-4425-b9f5-a58d52d16dd1","userId":"A7q4Z1P6SEyH9MGyVFMhkA","tenantId":"admin"}}</con:originalMessage>
          </con:configuration>
        </con:assertion>
        <con:credentials>
          <con:selectedAuthProfile>No Authorization</con:selectedAuthProfile>
          <con:authType>No Authorization</con:authType>
        </con:credentials>
        <con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
        <con:parameters/>
        <con:environmentSpec>
          <con:entry environmentId="145614f2-3764-4b2c-aea1-428a3da9b4e7">
            <con:authProfile>Inherit From Parent</con:authProfile>
          </con:entry>
          <con:entry environmentId="0348fa2a-7106-45b2-8fa8-793ec5904838">
            <con:authProfile>Inherit From Parent</con:authProfile>
          </con:entry>
        </con:environmentSpec>
      </con:restRequest>
    </con:config>
  </con:testStep>
  <con:testStep type="restrequest" name="queryParameterGroup" id="bccafd4a-d792-4e9b-b006-ee5880f7eadb">
    <con:settings/>
    <con:config service="TiEM UI API" methodName="GET" resourcePath="/api/v1/param-groups/" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <con:restRequest name="queryParameterGroup" id="a1d7abe8-6aed-4af2-bf4b-b69ee008cccd" mediaType="application/json">
        <con:settings>
          <con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;entry key="Authorization" value="Bearer ${login#Response#$['data']['token']}" xmlns="http://eviware.com/soapui/config"/></con:setting>
        </con:settings>
        <con:encoding>UTF-8</con:encoding>
        <con:endpoint>http://172.16.4.134:4100</con:endpoint>
        <con:request/>
        <con:originalUri>http://172.16.4.134/api/v1/param-groups/</con:originalUri>
        <con:assertion type="Valid HTTP Status Codes" id="25ebe5b9-b4ac-408d-b644-63b6d2a92d83" name="Valid HTTP Status Codes">
          <con:settings/>
          <con:configuration>
            <codes>200</codes>
          </con:configuration>
        </con:assertion>
        <con:assertion type="JsonPath Existence Match" id="96d7a64b-6646-4d6c-9037-c8ff80980cba" name="JSONPath Existence Match">
          <con:configuration>
            <path>$['data'][0]['name']</path>
            <content>true</content>
            <allowWildcards>false</allowWildcards>
            <ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
            <ignoreComments>false</ignoreComments>
          </con:configuration>
        </con:assertion>
        <con:credentials>
          <con:selectedAuthProfile>No Authorization</con:selectedAuthProfile>
          <con:authType>No Authorization</con:authType>
        </con:credentials>
        <con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
        <con:parameters>
          <con:entry key="hasDefault" value=""/>
          <con:entry key="clusterSpec" value=""/>
          <con:entry key="hasDetail" value=""/>
          <con:entry key="name" value=""/>
          <con:entry key="pageSize" value="10"/>
          <con:entry key="dbType" value=""/>
          <con:entry key="page" value="1"/>
          <con:entry key="clusterVersion" value=""/>
        </con:parameters>
      </con:restRequest>
    </con:config>
  </con:testStep>
  <con:testStep type="restrequest" name="getParameterGroup" id="45f13f44-b441-469e-bceb-5e30d3252b64">
    <con:settings/>
    <con:config service="TiEM UI API" methodName="GET" resourcePath="/api/v1/param-groups/{paramGroupId}" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <con:restRequest name="getParameterGroup" id="1653ad65-cc03-4ca6-a966-c2ed60e9b8ef" mediaType="application/json">
        <con:settings>
          <con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;entry key="Authorization" value="Bearer ${login#Response#$['data']['token']}" xmlns="http://eviware.com/soapui/config"/></con:setting>
        </con:settings>
        <con:encoding>UTF-8</con:encoding>
        <con:endpoint>http://172.16.4.134:4100</con:endpoint>
        <con:request/>
        <con:originalUri>http://172.16.4.134/api/v1/param-groups/</con:originalUri>
        <con:assertion type="Valid HTTP Status Codes" id="7872ff1d-5147-4cfe-b63c-e68067519c64" name="Valid HTTP Status Codes">
          <con:settings/>
          <con:configuration>
            <codes>200</codes>
          </con:configuration>
        </con:assertion>
        <con:assertion type="JsonPath Existence Match" id="d7c6f93d-5969-4f59-b9a2-a49b0659f13c" name="JSONPath Existence Match">
          <con:configuration>
            <path>$['data']['params'][0]['paramId']</path>
            <content>true</content>
            <allowWildcards>false</allowWildcards>
            <ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
            <ignoreComments>false</ignoreComments>
          </con:configuration>
        </con:assertion>
        <con:assertion type="JsonPath Count" id="c7017bae-d5fc-46ba-be76-485abe2667f5" name="JSONPath Count">
          <con:configuration>
            <path>$['data']</path>
            <content>1</content>
            <allowWildcards>false</allowWildcards>
            <ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
            <ignoreComments>false</ignoreComments>
          </con:configuration>
        </con:assertion>
        <con:credentials>
          <con:selectedAuthProfile>No Authorization</con:selectedAuthProfile>
          <con:authType>No Authorization</con:authType>
        </con:credentials>
        <con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
        <con:parameters>
          <con:entry key="paramGroupId" value="${queryParameterGroup#Response#$['data'][0]['paramGroupId']}"/>
          <con:entry key="instanceType" value=""/>
          <con:entry key="paramName" value=""/>
        </con:parameters>
        <con:parameterOrder>
          <con:entry>paramGroupId</con:entry>
          <con:entry>instanceType</con:entry>
          <con:entry>paramName</con:entry>
        </con:parameterOrder>
      </con:restRequest>
    </con:config>
  </con:testStep>
  <con:testStep type="restrequest" name="getBadParamGroupID" id="e2593437-94e7-47e4-86ff-f8c155ab5824">
    <con:settings/>
    <con:config service="TiEM UI API" methodName="GET" resourcePath="/api/v1/param-groups/{paramGroupId}" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <con:restRequest name="getBadParamGroupID" id="1653ad65-cc03-4ca6-a966-c2ed60e9b8ef" mediaType="application/json">
        <con:settings>
          <con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;entry key="Authorization" value="Bearer ${login#Response#$['data']['token']}" xmlns="http://eviware.com/soapui/config"/></con:setting>
        </con:settings>
        <con:encoding>UTF-8</con:encoding>
        <con:endpoint>http://172.16.4.134:4100</con:endpoint>
        <con:request/>
        <con:originalUri>http://172.16.4.134/api/v1/param-groups/</con:originalUri>
        <con:assertion type="Valid HTTP Status Codes" id="7872ff1d-5147-4cfe-b63c-e68067519c64" name="Valid HTTP Status Codes">
          <con:settings/>
          <con:configuration>
            <codes>500</codes>
          </con:configuration>
        </con:assertion>
        <con:credentials>
          <con:selectedAuthProfile>No Authorization</con:selectedAuthProfile>
          <con:authType>No Authorization</con:authType>
        </con:credentials>
        <con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
        <con:parameters>
          <con:entry key="paramGroupId" value="abcdefg"/>
          <con:entry key="instanceType" value=""/>
          <con:entry key="paramName" value=""/>
        </con:parameters>
        <con:parameterOrder>
          <con:entry>paramGroupId</con:entry>
          <con:entry>instanceType</con:entry>
          <con:entry>paramName</con:entry>
        </con:parameterOrder>
      </con:restRequest>
    </con:config>
  </con:testStep>
  <con:testStep type="restrequest" name="logout" id="393bfa75-6947-4a75-92f8-f31e7cff14d1">
    <con:settings/>
    <con:config service="TiEM UI API" resourcePath="/api/v1/user/logout" methodName="POST" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <con:restRequest name="logout" id="46b09598-0eaf-485d-aabe-472863647844" mediaType="application/json" postQueryString="false">
        <con:settings>
          <con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;entry key="Authorization" value="Bearer ${login#Response#$['data']['token']}" xmlns="http://eviware.com/soapui/config"/></con:setting>
        </con:settings>
        <con:endpoint>http://172.16.4.134:4100</con:endpoint>
        <con:request/>
        <con:originalUri>http://172.16.4.134/api/v1/user/logout</con:originalUri>
        <con:assertion type="Valid HTTP Status Codes" id="94494498-3063-4a1b-9c8a-d8a302ffd330" name="Valid HTTP Status Codes">
          <con:settings/>
          <con:configuration>
            <codes>200</codes>
          </con:configuration>
        </con:assertion>
        <con:credentials>
          <con:selectedAuthProfile>No Authorization</con:selectedAuthProfile>
          <con:authType>No Authorization</con:authType>
        </con:credentials>
        <con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
        <con:parameters/>
        <con:environmentSpec>
          <con:entry environmentId="145614f2-3764-4b2c-aea1-428a3da9b4e7">
            <con:authProfile>Inherit From Parent</con:authProfile>
          </con:entry>
          <con:entry environmentId="0348fa2a-7106-45b2-8fa8-793ec5904838">
            <con:authProfile>Inherit From Parent</con:authProfile>
          </con:entry>
        </con:environmentSpec>
      </con:restRequest>
    </con:config>
  </con:testStep>
  <con:properties/>
  <con:reportParameters/>
</con:testCase>
