juergen 2002/06/19 00:51:43
Added: testsuite/testsuite/junit/xmltestcases/DASL/functional/where/special_ops
isDefinedUserDefined.xml isDefinedOnUndefined.xml
isDefined.xml isCollection.xml
Log:
Testcases to check the 'where' element, using special operators, within DASL Basic
Search.
Revision Changes Path
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DASL/functional/where/special_ops/isDefinedUserDefined.xml
Index: isDefinedUserDefined.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Search for specific properties only on a resource where a
user defined property isDefined. </abstract>
<pre-Requisite>A collection has been created and defined in
tprocessor.cmd.</pre-Requisite>
<description>
1) Put a resource. This will contain the property that will be
referred to by the isDefined.
2) Put a resource. This will not contain any additional properties.
3) PropPatch to create the property 'test' on file one that will be
referred to by the isDefined.
4) Search for specific properties in a resource where the property
'test' is defined.
The requested properties of the first file should be returned but not
the second.
5) Delete all created resources.
</description>
<expectedResult>A 207 Multi-Status response code should be received as
a result of the Search.
The requested properties should be returned for the first file only,
this has the property 'test' defined.
The second only has the standard DAV properties and should not be
returned.
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>
<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="userNumber,globalVariableCollection,globalVariableServerName">PROPPATCH
/%globalVariableServerName%/%globalVariableCollection%/test.xml HTTP/1.1</command>
<header>Content-Type: text/xml</header>
<header>User-Agent: Microsoft Data Access Internet Publishing
Provider DAV</header>
<header>Accept-Language: en-us</header>
<header>Translate: f</header>
<header>Pragma: no-cache</header>
<header>Connection: close</header>
<body><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:"
xmlns:R="http://www.com/">
<D:set>
<D:prop>
<D:test>test</D:test>
</D:prop>
</D:set>
</D:propertyupdate>
]]></body>
</request>
<response>
<command>HTTP/1.0 (207,409) Multi-Status</command>
<header>Date: Tue, 13 Feb 2001 12:45:26 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>
<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:test
xmlns:D="DAV:"/>
</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"><![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>%globalVariableCollection%/</D:href>
</D:scope>
</D:from>
<D:where>
<D:isdefined>
<D:prop>
<D:test/>
</D:prop>
</D:isdefined>
</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:displayname>test.xml</D:displayname>
<D:getcontenttype>text/xml</D:getcontenttype>
<D:test>test</D:test>
</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/special_ops/isDefinedOnUndefined.xml
Index: isDefinedOnUndefined.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Search for specified properties on a resource where a user
defined property isDefined, regardless of its value.
However, the user defined property has not been defined on any of the
resources. </abstract>
<pre-Requisite>A collection has been created and defined in
tprocessor.cmd.</pre-Requisite>
<description>
1) Put a resource. This should NOT be returned as it does not have the
user defined property used in the isDefined of the Search.
2) Search for specific properties in a resource where the property
'doesntexist' is defined.
No properties should be returned as none contain this user defined
property.
3) Delete resource.
</description>
<expectedResult>A 207 Multi-Status with no body should be returned by
the Search.</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"><![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>%globalVariableCollection%/</D:href>
</D:scope>
</D:from>
<D:where>
<D:isdefined>
<D:prop>
<doesntexist/>
</D:prop>
</D:isdefined>
</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:" />
]]>
</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/special_ops/isDefined.xml
Index: isDefined.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Check isDefined element. Perform a Search for specified
properties on resources where
the 'getcontenttype' property is defined, regardless of what the value
is.
Since this property is not defined for a collection, nothing should be
returned.</abstract>
<pre-Requisite>A collection has been created and defined in
tprocessor.cmd.</pre-Requisite>
<description>
1) Search for specified properties on resources where the contenttype
property is defined.
Because this property is never defined for a collection, nothing will
be returned.
</description>
<expectedResult>A 207 Multi-Status response with nothing in the body
should be returned by the Search.
No resource exists where a getcontenttype property is
defined.</expectedResult>
</specification>
<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:getcontentlength/>
<D:getcontenttype/>
</D:prop>
</D:select>
<D:from>
<D:scope>
<D:href>%globalVariableCollection%/</D:href>
</D:scope>
</D:from>
<D:where>
<D:isdefined>
<D:prop>
<D:getcontenttype/>
</D:prop>
</D:isdefined>
</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>
</test>
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DASL/functional/where/special_ops/isCollection.xml
Index: isCollection.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> Search for specified properties of only collections.
</abstract>
<pre-Requisite>A collection has been created and defined in
tprocessor.cmd.</pre-Requisite>
<description>
1) MKColl to create a collection under the root collection that should
be returned by the Search.
2) A Put at root level. This resource should not be returned.
3) A Put at the newly created level. This resource should not be
returned.
4) A Search for specific properties of only collections.
5) The resources are deleted.
</description>
<expectedResult>A 207 Multi-Status response should be returned as a
result of the Search.
The requested properties should be returned from the root collection
and newly created collection only.
Inside the body, a 200 OK response code should be returned for each
resource where the property has been discovered.
A 404 Not Found error should be returned for the 'test' property. This
does not exist on any resource.
</expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName"> MKCOL
/%globalVariableServerName%/%globalVariableCollection%/collectionshouldbereturned
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>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
<header>Date: Wed, 21 Feb 2001 12:55:57 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%/shouldntbereturned.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%/collectionshouldbereturned/alsoshouldntbereturned.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"><![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>%globalVariableCollection%/</D:href>
</D:scope>
</D:from>
<D:where>
<D:is-collection/>
</D:where>
<D:orderby>
<D:order>
<D:prop>
<D:displayname/>
</D:prop>
</D:order>
</D:orderby>
</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%/collectionshouldbereturned</D:href>
<D:propstat>
<D:prop>
<D:displayname>collectionshouldbereturned</D:displayname>
<D:getcontentlength>0</D:getcontentlength>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
<D:propstat>
<D:prop>
<D:getcontenttype />
</D:prop>
<D:status>HTTP/1.1 404 Not Found</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/%globalVariableServerName%/%globalVariableCollection%</D:href>
<D:propstat>
<D:prop>
<D:displayname>%globalVariableCollection%</D:displayname>
<D:getcontentlength>0</D:getcontentlength>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
<D:propstat>
<D:prop>
<D:getcontenttype />
</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%/collectionshouldbereturned
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%/shouldntbereturned.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]>