You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by ju...@apache.org on 2002/06/19 08:59:44 UTC
cvs commit: jakarta-slide/testsuite/testsuite/junit/xmltestcases/DASL/functional/where/eq displayNameNonExistent.xml displayName.xml contentLength.xml
juergen 2002/06/18 23:59:44
Added: testsuite/testsuite/junit/xmltestcases/DASL/functional/where/eq
displayNameNonExistent.xml displayName.xml
contentLength.xml
Log:
Testcases to check the 'where' element, using the 'eq' operator, within DASL Basic Search.
Revision Changes Path
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/DASL/functional/where/eq/displayNameNonExistent.xml
Index: displayNameNonExistent.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> A Property is searched for, where the displayname must match the specified string.
However, no file exists with the given displayname.</abstract>
<pre-Requisite>A collection has been created and defined in tprocessor.cmd.</pre-Requisite>
<description>
1) A document is Put on to the server. This does NOT have a display name equal to that specified within the search.
Therefore, its properties should not be returned by the Search.
2) A Search is performed. The displayname requested does not exist.
3) The document is deleted.
</description>
<expectedResult>A 207 Multi-Status response code should be returned with nothing in the body. No file has matched
the specified displayname.</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>
<body fileReference="../../../../contentDirectory/validXML.xm1">
</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,globalVariableServerName"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<searchrequest xmlns:D="DAV:">
<D:basicsearch>
<D:select>
<D:prop>
<D:displayname/>
<D:getcontentlength/>
<D:getcontenttype/>
</D:prop>
</D:select>
<D:from>
<D:scope>
<D:href>/%globalVariableServerName%/%globalVariableCollection%</D:href>
<D:depth>1</D:depth>
</D:scope>
</D:from>
<D:where>
<D:eq>
<D:prop>
<D:displayname/>
</D:prop>
<D:literal>doesntexist.xml</D:literal>
</D:eq>
</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:" />
]]>
</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>
</cleanup>
</test>
1.1 jakarta-slide/testsuite/testsuite/junit/xmltestcases/DASL/functional/where/eq/displayName.xml
Index: displayName.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Search for specified Properties on resources where the displayname matches a specified string. </abstract>
<pre-Requisite>A collection has been created and defined in tprocessor.cmd.</pre-Requisite>
<description>
1) A resource is Put on to the Server. The displayname property matches the one being sought.
2) A second resource is Put to the Server. The properties of this file should NOT be returned as its displayname property
does not match the specified string.
3) A Search is performed. The specified properties are only returned where the displayname property matches the
string 'test.xml'. Case sensitivity is not stated.
4) The resources are deleted.
</description>
<expectedResult>A 207 Multi-Status response code should be returned by the Search.
Within the body the requested properties should be returned for the first file 'test.xml' only.
This is the only resource where the displayname property is 'test.xml'.
The first two properties should be discovered with a 200 OK response code,
the third property 'test' does not exist and should return a 404 Not Found error response code.
</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>
<body fileReference="../../../../contentDirectory/validXML.xm1">
</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 fileReference="../../../../contentDirectory/validXML.xm1">
</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,globalVariableServerName"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<searchrequest xmlns:D="DAV:">
<D:basicsearch>
<D:select>
<D:prop>
<D:displayname/>
<D:getcontenttype/>
<D:test/>
</D:prop>
</D:select>
<D:from>
<D:scope>
<D:href>/%globalVariableServerName%/%globalVariableCollection%/</D:href>
</D:scope>
</D:from>
<D:where>
<D:eq>
<D:prop>
<D:displayname/>
</D:prop>
<D:literal>test.xml</D:literal>
</D:eq>
</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:propstat>
<D:prop>
<D:test />
</D:prop>
<D:status>HTTP/1.1 404 Not Found</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/eq/contentLength.xml
Index: contentLength.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Specified properties are searched for on resources where the contentlength equals a specified value. </abstract>
<pre-Requisite>A collection has been created and defined in tprocessor.cmd.</pre-Requisite>
<description>
1) A Put command to put the resource that will be Searched.
2) PropFind to establish the content length of the resource.
3) A Search is performed on the resource. The content length must match the specified value.
This specifed value is equal to the amount discovered by the PropFind.
4) The resource is deleted.
</description>
<expectedResult>A 207 Multi-Status response must be returned by the Search.
The requested properties should be returned within the Search response.</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>
<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="globalVariableCollection,globalVariableServerName">PROPFIND /%globalVariableServerName%/%globalVariableCollection%/test.xml HTTP/1.1</command>
<header>Accept-Language: en-us</header>
<header>Content-Type: text/xml</header>
<header>Translate: f</header>
<header>Depth: 1</header>
<header>User-Agent: Microsoft Data Access Internet Publishing Provider DAV</header>
<header>Connection: Keep-Alive</header>
<body><![CDATA[<?xml version="1.0"?>
<D:propfind xmlns:D="DAV:">
<D:prop>
<D:getcontentlength/>
</D:prop>
</D:propfind>
]]></body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<header>Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java 1.3.0_02; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
<body varUsage="globalVariableCollection,globalVariableServerName" varDefinition="testresourcecontentlength" varPath="multistatus/response/propstat/prop/getcontentlength"><![CDATA[
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%/test.xml</D:href>
<D:propstat>
<D:prop>
<D:getcontentlength>*</D:getcontentlength>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
]]>
</body>
</response>
</step>
<step>
<request>
<command varUsage ="globalVariableServerName">SEARCH /%globalVariableServerName% HTTP/1.1</command>
<body varUsage="globalVariableCollection,globalVariableServerName,testresourcecontentlength"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<searchrequest xmlns:D="DAV:">
<D:basicsearch>
<D:select>
<D:prop>
<D:displayname/>
<D:getcontentlength/>
<D:getcontenttype/>
</D:prop>
</D:select>
<D:from>
<D:scope>
<D:href>/%globalVariableServerName%/%globalVariableCollection%/</D:href>
</D:scope>
</D:from>
<D:where>
<D:eq>
<D:prop>
<D:getcontentlength/>
</D:prop>
<D:literal>%testresourcecontentlength%</D:literal>
</D:eq>
</D:where>
</D:basicsearch>
</searchrequest>
]]>
</body>
</request>
<response>
<command>HTTP/1.0 207 Multi-Status</command>
<body varUsage="globalVariableServerName,globalVariableCollection,testresourcecontentlength"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%/test.xml</D:href>
<propstat xmlns="DAV:">
<prop>
<displayname>test.xml</displayname>
<getcontentlength>%testresourcecontentlength%</getcontentlength>
<getcontenttype>text/xml</getcontenttype>
</prop>
<status>HTTP/1.1 200 OK</status>
</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>
</cleanup>
</test>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>