260 !strcmp((char*)p2->set->property->namespace->href, "http://example.com/"), |
260 !strcmp((char*)p2->set->property->namespace->href, "http://example.com/"), |
261 "p2: set property 1: wrong namespace"); |
261 "p2: set property 1: wrong namespace"); |
262 UCX_TEST_ASSERT( |
262 UCX_TEST_ASSERT( |
263 !strcmp(p2->set->property->name, "a"), |
263 !strcmp(p2->set->property->name, "a"), |
264 "p2: set property 1: wrong name"); |
264 "p2: set property 1: wrong name"); |
265 WSXmlNode *p2set1 = p2->set->property->value; |
265 WSXmlNode *p2set1 = p2->set->property->value.node; |
266 UCX_TEST_ASSERT( |
266 UCX_TEST_ASSERT( |
267 p2set1->type == WS_NODE_TEXT, |
267 p2set1->type == WS_NODE_TEXT, |
268 "p2: set property 1: wrong type"); |
268 "p2: set property 1: wrong type"); |
269 UCX_TEST_ASSERT( |
269 UCX_TEST_ASSERT( |
270 p2set1->content, |
270 p2set1->content, |
271 "p2: set property 1: no text"); |
271 "p2: set property 1: no text"); |
272 UCX_TEST_ASSERT( |
272 UCX_TEST_ASSERT( |
273 !strcmp((char*)p2set1->content, "test"), |
273 !strcmp((char*)p2set1->content, "test"), |
274 "p2: set property 1: wrong value"); |
274 "p2: set property 1: wrong value"); |
275 |
275 |
276 WSXmlNode *p2set3 = p2->set->next->next->property->value; |
276 WSXmlNode *p2set3 = p2->set->next->next->property->value.node; |
277 UCX_TEST_ASSERT(p2set3, "p2: set property 3 missing"); |
277 UCX_TEST_ASSERT(p2set3, "p2: set property 3 missing"); |
278 UCX_TEST_ASSERT( |
278 UCX_TEST_ASSERT( |
279 p2set3->type == WS_NODE_TEXT, |
279 p2set3->type == WS_NODE_TEXT, |
280 "p2: set property 3: wrong type"); |
280 "p2: set property 3: wrong type"); |
281 UCX_TEST_ASSERT( |
281 UCX_TEST_ASSERT( |
380 |
380 |
381 r = (MSResponse*)ms->response.addresource((WebdavResponse*)ms, "/"); |
381 r = (MSResponse*)ms->response.addresource((WebdavResponse*)ms, "/"); |
382 |
382 |
383 WebdavProperty p1; |
383 WebdavProperty p1; |
384 WebdavProperty p[16]; |
384 WebdavProperty p[16]; |
|
385 const char *names[] = {"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9"}; |
|
386 |
|
387 // init test data |
|
388 p1.namespace = webdav_dav_namespace(); |
|
389 p1.lang = NULL; |
|
390 p1.name = "test1"; |
|
391 p1.value.data = NULL; |
|
392 p1.vtype = 0; |
|
393 |
|
394 for(int i=0;i<8;i++) { |
|
395 p[i].namespace = webdav_dav_namespace(); |
|
396 p[i].name = names[i]; |
|
397 p[i].lang = NULL; |
|
398 p[i].value.node = NULL; |
|
399 p[1].vtype = 0; |
|
400 } |
385 |
401 |
386 UCX_TEST_ASSERT(!r->plist_begin && !r->plist_end, "plist not empty"); |
402 UCX_TEST_ASSERT(!r->plist_begin && !r->plist_end, "plist not empty"); |
387 |
403 |
388 r->resource.addproperty((WebdavResource*)r, &p1, 200); |
404 r->resource.addproperty((WebdavResource*)r, &p1, 200); |
389 UCX_TEST_ASSERT(r->plist_begin, "!plist_begin"); |
405 UCX_TEST_ASSERT(r->plist_begin, "!plist_begin"); |