[CalendarServer-changes] [2783] CalDAVTester/branches/users/cdaboo/implicit-2661

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 7 08:26:19 PDT 2008


Revision: 2783
          http://trac.macosforge.org/projects/calendarserver/changeset/2783
Author:   cdaboo at apple.com
Date:     2008-08-07 08:26:18 -0700 (Thu, 07 Aug 2008)
Log Message:
-----------
Test logic for getting/setting CALDAV:schedule-default-calendar-URL property.

Added Paths:
-----------
    CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/
    CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/
    CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/1.xml
    CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/2.xml
    CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/3.xml
    CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/4.xml
    CalDAVTester/branches/users/cdaboo/implicit-2661/scripts/tests/implicitdefaultcalendar.xml

Added: CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/1.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/1.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/1.xml	2008-08-07 15:26:18 UTC (rev 2783)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:prop>
+<C:schedule-default-calendar-URL/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/2.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/2.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/2.xml	2008-08-07 15:26:18 UTC (rev 2783)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:set>
+<D:prop>
+<C:schedule-default-calendar-URL><D:href>$calendarpath1:</D:href></C:schedule-default-calendar-URL>
+</D:prop>
+</D:set>
+</D:propertyupdate>

Added: CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/3.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/3.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/3.xml	2008-08-07 15:26:18 UTC (rev 2783)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:set>
+<D:prop>
+<C:schedule-default-calendar-URL><D:href>$pathprefix:/bogus/</D:href></C:schedule-default-calendar-URL>
+</D:prop>
+</D:set>
+</D:propertyupdate>

Added: CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/4.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/4.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/implicit-2661/Resource/implicit/defaultcalendar/4.xml	2008-08-07 15:26:18 UTC (rev 2783)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:set>
+<D:prop>
+<C:schedule-default-calendar-URL/>
+</D:prop>
+</D:set>
+</D:propertyupdate>

Added: CalDAVTester/branches/users/cdaboo/implicit-2661/scripts/tests/implicitdefaultcalendar.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/implicit-2661/scripts/tests/implicitdefaultcalendar.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/implicit-2661/scripts/tests/implicitdefaultcalendar.xml	2008-08-07 15:26:18 UTC (rev 2783)
@@ -0,0 +1,206 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2007 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ DRI: Cyrus Daboo, cdaboo at apple.com
+ -->
+
+<caldavtest>
+	<description>Test default calendar behavior in CalDAV</description>
+
+	<start/>
+	
+	<test-suite name='Empty Property' ignore='no'>
+		<test name='1'>
+			<description>Look for empty property on inbox</description>
+			<request print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<ruri>$pathprefix:/$inbox:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/defaultcalendar/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:caldavschedule-default-calendar-URL$</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='Set valid Property' ignore='no'>
+		<test name='1'>
+			<description>Look for empty property on inbox</description>
+			<request print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<ruri>$pathprefix:/$inbox:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/defaultcalendar/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:caldavschedule-default-calendar-URL$</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Set property on Inbox</description>
+			<request print-response='no'>
+				<method>PROPPATCH</method>
+				<ruri>$pathprefix:/$inbox:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/defaultcalendar/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:caldavschedule-default-calendar-URL</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Verify property on inbox</description>
+			<request print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<ruri>$pathprefix:/$inbox:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/defaultcalendar/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:caldavschedule-default-calendar-URL$&lt;href xmlns="DAV:"&gt;$calendarpath1:&lt;/href&gt;</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='Set invalid Property' ignore='no'>
+		<test name='1'>
+			<description>Set property on Inbox</description>
+			<request print-response='no'>
+				<method>PROPPATCH</method>
+				<ruri>$pathprefix:/$inbox:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/defaultcalendar/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>badprops</name>
+						<value>urn:ietf:params:xml:ns:caldavschedule-default-calendar-URL</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Verify property on inbox</description>
+			<request print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<ruri>$pathprefix:/$inbox:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/defaultcalendar/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:caldavschedule-default-calendar-URL$&lt;href xmlns="DAV:"&gt;$calendarpath1:&lt;/href&gt;</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='Set empty Property' ignore='no'>
+		<test name='1'>
+			<description>Set property on Inbox</description>
+			<request print-response='no'>
+				<method>PROPPATCH</method>
+				<ruri>$pathprefix:/$inbox:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/defaultcalendar/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:caldavschedule-default-calendar-URL</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Verify property on inbox</description>
+			<request print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<ruri>$pathprefix:/$inbox:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/defaultcalendar/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:caldavschedule-default-calendar-URL$</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<end/>
+	
+</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080807/25f3ed5d/attachment.html 


More information about the calendarserver-changes mailing list