juergen     2002/06/19 00:53:22

  Added:       testsuite/testsuite/junit/xmltestcases/DASL/functional/where/content_ops
                        onlyProps.xml contentAndProps.xml
  Log:
  Testcases to check the 'where' element, using content operators, within DASL Basic 
Search.
  
  Revision  Changes    Path
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DASL/functional/where/content_ops/onlyProps.xml
  
  Index: onlyProps.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
  
  <test>
        <specification>
                
                <abstract> Search for resources containing a specified String, no 
properties are requested. Only the HREF is returned. </abstract>
                
                <pre-Requisite>A collection has been created and defined in 
tprocessor.cmd.</pre-Requisite>
                
                <description>
                1) Put a resource. This contains the text matching the string that 
will be searched for.
                2) Put a resource. This does not contain the text matching the string 
that will be searched for.
                3) Search for only the resource where the string 'stringtofind' 
occurs, no properties are requested.
                4) Delete resources.
                </description>
                
                <expectedResult>A 207 Multi-Status response should be returned as a 
result of the Search.
                Only the HREF element of the resource should be returned. No 
properties should be returned.
                Inside the body, a 200 OK response code should be returned for each 
resource.
                </expectedResult>
                
        </specification>
        
        
        <step> 
                <request>
                        <command varUsage 
="userNumber,globalVariableCollection,globalVariableServerName">PUT 
/%globalVariableServerName%/%globalVariableCollection%/test.xml HTTP/1.1</command>
                        <header>Accept-Language: en-us</header>
                        <header>Translate: f</header>
                        <header>User-Agent: Microsoft Data Access Internet Publishing 
Provider DAV</header>
                        <header>Connection: Keep-Alive</header>
                        
  <!-- Element 13 contains the string that is being searched for. -->
  
                        <body><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
  <ValidXML>
  <ValidXML2>This is a test Valid XML document</ValidXML2>
  <ValidXML3>This is a test Valid XML document</ValidXML3>
  <ValidXML4>This is a test Valid XML document</ValidXML4>
  <ValidXML5>This is a test Valid XML document</ValidXML5>
  <ValidXML6>This is a test Valid XML document</ValidXML6>
  <ValidXML7>This is a test Valid XML document</ValidXML7>
  <ValidXML8>This is a test Valid XML document</ValidXML8>
  <ValidXML9>This is a test Valid XML document</ValidXML9>
  <ValidXML10>This is a test Valid XML document</ValidXML10>
  <ValidXML11>This is a test Valid XML document</ValidXML11>
  <ValidXML12>This is a test Valid XML document</ValidXML12>
  <ValidXML13>This is a test stringtofind Valid XML document</ValidXML13>
  <ValidXML14>This is a test Valid XML document</ValidXML14>
  <ValidXML15>This is a test Valid XML document</ValidXML15>
  <ValidXML16>This is a test Valid XML document</ValidXML16>
  <ValidXML17>This is a test Valid XML document</ValidXML17>
  <ValidXML18>This is a test Valid XML document</ValidXML18>
  <ValidXML19>This is a test Valid XML document</ValidXML19>
  <ValidXML20>This is a test Valid XML document</ValidXML20>
  <ValidXML21>This is a test Valid XML document</ValidXML21>
  <ValidXML22>This is a test Valid XML document</ValidXML22>
  <ValidXML23>This is a test Valid XML document</ValidXML23>
  </ValidXML>]]>
                        </body>
                </request>
                
                <response>
                        <command>HTTP/1.0 201 Created</command>
                        <header>Date: Mon, 12 Mar 2001 17:21:35 GMT+01:00</header>
                        <header>Content-Language: en</header>
                        <header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; 
Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems 
Inc.)</header>
                </response>     
        </step>
        
        
        <step> 
                <request>
                        <command varUsage 
="userNumber,globalVariableCollection,globalVariableServerName">PUT 
/%globalVariableServerName%/%globalVariableCollection%/test2.xml HTTP/1.1</command>
                        <header>Accept-Language: en-us</header>
                        <header>Translate: f</header>
                        <header>User-Agent: Microsoft Data Access Internet Publishing 
Provider DAV</header>
                        <header>Connection: Keep-Alive</header>
    
                        <body><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
  <ValidXML>
  <ValidXML2>This is a test Valid XML document</ValidXML2>
  <ValidXML3>This is a test Valid XML document</ValidXML3>
  <ValidXML4>This is a test Valid XML document</ValidXML4>
  <ValidXML5>This is a test Valid XML document</ValidXML5>
  <ValidXML6>This is a test Valid XML document</ValidXML6>
  <ValidXML7>This is a test Valid XML document</ValidXML7>
  <ValidXML8>This is a test Valid XML document</ValidXML8>
  <ValidXML9>This is a test Valid XML document</ValidXML9>
  <ValidXML10>This is a test Valid XML document</ValidXML10>
  <ValidXML11>This is a test Valid XML document</ValidXML11>
  <ValidXML12>This is a test Valid XML document</ValidXML12>
  <ValidXML13>This is a test Valid XML document</ValidXML13>
  <ValidXML14>This is a test Valid XML document</ValidXML14>
  <ValidXML15>This is a test Valid XML document</ValidXML15>
  <ValidXML16>This is a test Valid XML document</ValidXML16>
  <ValidXML17>This is a test Valid XML document</ValidXML17>
  <ValidXML18>This is a test Valid XML document</ValidXML18>
  <ValidXML19>This is a test Valid XML document</ValidXML19>
  <ValidXML20>This is a test Valid XML document</ValidXML20>
  <ValidXML21>This is a test Valid XML document</ValidXML21>
  <ValidXML22>This is a test Valid XML document</ValidXML22>
  <ValidXML23>This is a test Valid XML document</ValidXML23>
  </ValidXML>]]>
                        </body>
                </request>
                
                <response>
                        <command>HTTP/1.0 201 Created</command>
                        <header>Date: Mon, 12 Mar 2001 17:21:35 GMT+01:00</header>
                        <header>Content-Language: en</header>
                        <header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; 
Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems 
Inc.)</header>
                </response>     
        </step>
        
  
        <step> 
                <request>
                        <command varUsage ="globalVariableServerName">SEARCH 
/%globalVariableServerName% HTTP/1.1</command>
                        <body varUsage="globalVariableCollection"><![CDATA[<?xml 
version="1.0" encoding="UTF-8"?>
                                                <searchrequest xmlns:D="DAV:">
                                                        <D:basicsearch>
                                                                <D:select>
                                                                        <D:prop/>
                                                                </D:select>
                                                                <D:from>
                                                                        <D:scope>
                                                                                
<D:href>%globalVariableCollection%</D:href>
                                                                                
<D:depth>1</D:depth>
                                                                        </D:scope>
                                                                </D:from>
                                                                <D:where>
                                                                        
<D:contains>stringtofind</D:contains>
                                                                </D:where>
                                                        </D:basicsearch>
                                                </searchrequest>
                                ]]>                     
                        </body>
                </request>
                
                <response>
                        <command>HTTP/1.0 207 Multi-Status</command>
                        <body 
varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="UTF-8"?>
                                                <D:multistatus xmlns:D="DAV:">
                                                        <D:response>
                                                                
<D:href>/%globalVariableServerName%/%globalVariableCollection%/test.xml</D:href>
                                                                <D:propstat>
                                                                        <D:prop />
                                                                        
<D:status>HTTP/1.1 200 OK</D:status>
                                                                </D:propstat>
                                                        </D:response>
                                                </D:multistatus>
                        ]]>
                        </body>
                </response>     
        </step>
        
        
        
        <cleanup>
      
     
                <step>
                        <request>
                                        <command 
varUsage="globalVariableCollection,globalVariableServerName"> DELETE 
/%globalVariableServerName%/%globalVariableCollection%/test.xml HTTP/1.1</command>
                                <header>Accept-Language: en-us</header>
                                <header>Destroy: NoUndelete</header>
                                <header>Translate: f</header>
                                <header>User-Agent: Microsoft Data Access Internet 
Publishing Provider DAV</header>
                                <header>Connection: Keep-Alive</header>
                                </request>
        
                                <response>
                                <command>HTTP/1.0 204 No Content</command>             
 
                                <header>Date: Wed, 14 Mar 2001 14:47:37 
GMT+01:00</header>
                                <header>Content-Language: en</header>
                                <header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 
(JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems 
Inc.)</header>
                                </response>     
                </step>
                
                <step>
                        <request>
                                        <command 
varUsage="globalVariableCollection,globalVariableServerName"> DELETE 
/%globalVariableServerName%/%globalVariableCollection%/test2.xml HTTP/1.1</command>
                                <header>Accept-Language: en-us</header>
                                <header>Destroy: NoUndelete</header>
                                <header>Translate: f</header>
                                <header>User-Agent: Microsoft Data Access Internet 
Publishing Provider DAV</header>
                                <header>Connection: Keep-Alive</header>
                                </request>
        
                                <response>
                                <command>HTTP/1.0 204 No Content</command>             
 
                                <header>Date: Wed, 14 Mar 2001 14:47:37 
GMT+01:00</header>
                                <header>Content-Language: en</header>
                                <header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 
(JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems 
Inc.)</header>
                                </response>     
                </step>
                
                
                
                
                
                
                
        </cleanup>
        
        
        
  
        
        
        
  </test>
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DASL/functional/where/content_ops/contentAndProps.xml
  
  Index: contentAndProps.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
  
  <test>
        <specification>
                
                <abstract> Search for specific properties within a resource that 
contains a stated string. </abstract>
                
                <pre-Requisite>A collection has been created and defined in 
tprocessor.cmd.</pre-Requisite>
                
                <description>
                1) Put a resource. This contains the text that will be searched for.
                2) Put a resource. This does not contain the text that will be 
searched for.
                3) Search for specified properties in a resource where the string 
'stringtofind' occurs.
                4) Delete resources.
                </description>
                
                <expectedResult>A 207 Multi-Status response should be returned as a 
result of the Search.
                The requested properties should be returned for the first file only, 
this contains the string 'stringtofind'.
                Inside the body, a 200 OK response code should be returned for each 
resource where the property has been discovered.
                </expectedResult>
                
        </specification>
        
        
        <step> 
                <request>
                        <command varUsage 
="userNumber,globalVariableCollection,globalVariableServerName">PUT 
/%globalVariableServerName%/%globalVariableCollection%/test.xml HTTP/1.1</command>
                        <header>Accept-Language: en-us</header>
                        <header>Translate: f</header>
                        <header>User-Agent: Microsoft Data Access Internet Publishing 
Provider DAV</header>
                        <header>Connection: Keep-Alive</header>
                        
  <!-- Element 13 contains the string that is being searched for. -->
  
                        <body><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
  <ValidXML>
  <ValidXML2>This is a test Valid XML document</ValidXML2>
  <ValidXML3>This is a test Valid XML document</ValidXML3>
  <ValidXML4>This is a test Valid XML document</ValidXML4>
  <ValidXML5>This is a test Valid XML document</ValidXML5>
  <ValidXML6>This is a test Valid XML document</ValidXML6>
  <ValidXML7>This is a test Valid XML document</ValidXML7>
  <ValidXML8>This is a test Valid XML document</ValidXML8>
  <ValidXML9>This is a test Valid XML document</ValidXML9>
  <ValidXML10>This is a test Valid XML document</ValidXML10>
  <ValidXML11>This is a test Valid XML document</ValidXML11>
  <ValidXML12>This is a test Valid XML document</ValidXML12>
  <ValidXML13>This is a test stringtofind Valid XML document</ValidXML13>
  <ValidXML14>This is a test Valid XML document</ValidXML14>
  <ValidXML15>This is a test Valid XML document</ValidXML15>
  <ValidXML16>This is a test Valid XML document</ValidXML16>
  <ValidXML17>This is a test Valid XML document</ValidXML17>
  <ValidXML18>This is a test Valid XML document</ValidXML18>
  <ValidXML19>This is a test Valid XML document</ValidXML19>
  <ValidXML20>This is a test Valid XML document</ValidXML20>
  <ValidXML21>This is a test Valid XML document</ValidXML21>
  <ValidXML22>This is a test Valid XML document</ValidXML22>
  <ValidXML23>This is a test Valid XML document</ValidXML23>
  </ValidXML>]]>
                        </body>
                </request>
                
                <response>
                        <command>HTTP/1.0 201 Created</command>
                        <header>Date: Mon, 12 Mar 2001 17:21:35 GMT+01:00</header>
                        <header>Content-Language: en</header>
                        <header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; 
Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems 
Inc.)</header>
                </response>     
        </step>
        
        
        <step> 
                <request>
                        <command varUsage 
="userNumber,globalVariableCollection,globalVariableServerName">PUT 
/%globalVariableServerName%/%globalVariableCollection%/test2.xml HTTP/1.1</command>
                        <header>Accept-Language: en-us</header>
                        <header>Translate: f</header>
                        <header>User-Agent: Microsoft Data Access Internet Publishing 
Provider DAV</header>
                        <header>Connection: Keep-Alive</header>
    
                        <body><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
  <ValidXML>
  <ValidXML2>This is a test Valid XML document</ValidXML2>
  <ValidXML3>This is a test Valid XML document</ValidXML3>
  <ValidXML4>This is a test Valid XML document</ValidXML4>
  <ValidXML5>This is a test Valid XML document</ValidXML5>
  <ValidXML6>This is a test Valid XML document</ValidXML6>
  <ValidXML7>This is a test Valid XML document</ValidXML7>
  <ValidXML8>This is a test Valid XML document</ValidXML8>
  <ValidXML9>This is a test Valid XML document</ValidXML9>
  <ValidXML10>This is a test Valid XML document</ValidXML10>
  <ValidXML11>This is a test Valid XML document</ValidXML11>
  <ValidXML12>This is a test Valid XML document</ValidXML12>
  <ValidXML13>This is a test Valid XML document</ValidXML13>
  <ValidXML14>This is a test Valid XML document</ValidXML14>
  <ValidXML15>This is a test Valid XML document</ValidXML15>
  <ValidXML16>This is a test Valid XML document</ValidXML16>
  <ValidXML17>This is a test Valid XML document</ValidXML17>
  <ValidXML18>This is a test Valid XML document</ValidXML18>
  <ValidXML19>This is a test Valid XML document</ValidXML19>
  <ValidXML20>This is a test Valid XML document</ValidXML20>
  <ValidXML21>This is a test Valid XML document</ValidXML21>
  <ValidXML22>This is a test Valid XML document</ValidXML22>
  <ValidXML23>This is a test Valid XML document</ValidXML23>
  </ValidXML>]]>
                        </body>
                </request>
                
                <response>
                        <command>HTTP/1.0 201 Created</command>
                        <header>Date: Mon, 12 Mar 2001 17:21:35 GMT+01:00</header>
                        <header>Content-Language: en</header>
                        <header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; 
Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems 
Inc.)</header>
                </response>     
        </step>
        
        
        <step> 
                <request>
                        <command varUsage ="globalVariableServerName">SEARCH 
/%globalVariableServerName% HTTP/1.1</command>
                        <body varUsage="globalVariableCollection"><![CDATA[<?xml 
version="1.0" encoding="UTF-8"?>
                                        <searchrequest xmlns:D="DAV:">
                                                <D:basicsearch>
                                                        <D:select>
                                                                <D:prop>
                                                                        
<D:displayname/>        
                                                                        
<D:getcontenttype/>
                                                                </D:prop>
                                                        </D:select>
                                                        <D:from>
                                                                <D:scope>
                                                                        
<D:href>%globalVariableCollection%</D:href>
                                                                </D:scope>
                                                        </D:from>
                                                        <D:where>
                                                                
<D:contains>stringtofind</D:contains>
                                                        </D:where>
                                                </D:basicsearch>
                                        </searchrequest>
                                ]]>                     
                        </body>
                </request>
                
                <response>
                        <command>HTTP/1.0 207 Multi-Status</command>
                        <body 
varUsage="globalVariableServerName,globalVariableCollection"><![CDATA[<?xml 
version="1.0" encoding="UTF-8"?>
                                                <D:multistatus xmlns:D="DAV:">
                                                        <D:response>
                                                                
<D:href>/%globalVariableServerName%/%globalVariableCollection%/test.xml</D:href>
                                                                        <D:propstat>
                                                                                
<D:prop>
                                                                                       
 <D:displayname>test.xml</D:displayname>
                                                                                       
 <D:getcontenttype>text/xml</D:getcontenttype>
                                                                                
</D:prop>
                                                                                
<D:status>HTTP/1.1 200 OK</D:status>
                                                                        </D:propstat>
                                                        </D:response>
                                                </D:multistatus>
                        ]]>
                        </body>
                </response>     
        </step>
        
                
        <cleanup>
      
     
                <step>
                        <request>
                                        <command 
varUsage="globalVariableCollection,globalVariableServerName"> DELETE 
/%globalVariableServerName%/%globalVariableCollection%/test.xml HTTP/1.1</command>
                                <header>Accept-Language: en-us</header>
                                <header>Destroy: NoUndelete</header>
                                <header>Translate: f</header>
                                <header>User-Agent: Microsoft Data Access Internet 
Publishing Provider DAV</header>
                                <header>Connection: Keep-Alive</header>
                                </request>
        
                                <response>
                                <command>HTTP/1.0 204 No Content</command>             
 
                                <header>Date: Wed, 14 Mar 2001 14:47:37 
GMT+01:00</header>
                                <header>Content-Language: en</header>
                                <header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 
(JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems 
Inc.)</header>
                                </response>     
                </step>
                
                   
                <step>
                        <request>
                                        <command 
varUsage="globalVariableCollection,globalVariableServerName"> DELETE 
/%globalVariableServerName%/%globalVariableCollection%/test2.xml HTTP/1.1</command>
                                <header>Accept-Language: en-us</header>
                                <header>Destroy: NoUndelete</header>
                                <header>Translate: f</header>
                                <header>User-Agent: Microsoft Data Access Internet 
Publishing Provider DAV</header>
                                <header>Connection: Keep-Alive</header>
                                </request>
        
                                <response>
                                <command>HTTP/1.0 204 No Content</command>             
 
                                <header>Date: Wed, 14 Mar 2001 14:47:37 
GMT+01:00</header>
                                <header>Content-Language: en</header>
                                <header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 
(JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems 
Inc.)</header>
                                </response>     
                </step>
                
                
                
        </cleanup>
        
        
        
        
        
  </test>
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to