847 UCX_TEST_ASSERT(r->errors, "no prop errors"); |
847 UCX_TEST_ASSERT(r->errors, "no prop errors"); |
848 UCX_TEST_ASSERT(r->errors->next, "no second error code"); |
848 UCX_TEST_ASSERT(r->errors->next, "no second error code"); |
849 UCX_TEST_ASSERT(r->errors->next->next, "no third error code"); |
849 UCX_TEST_ASSERT(r->errors->next->next, "no third error code"); |
850 UCX_TEST_ASSERT(!r->errors->next->next->next, "too many error codes"); |
850 UCX_TEST_ASSERT(!r->errors->next->next->next, "too many error codes"); |
851 |
851 |
852 UCX_TEST_ASSERT(ucx_list_size(r->errors->begin) == 2, "404 list size != 2"); |
852 UCX_TEST_ASSERT(webdav_plist_size(r->errors->begin) == 2, "404 list size != 2"); |
853 UCX_TEST_ASSERT(ucx_list_size(r->errors->next->begin) == 4, "403 list size != 4"); |
853 UCX_TEST_ASSERT(webdav_plist_size(r->errors->next->begin) == 4, "403 list size != 4"); |
854 UCX_TEST_ASSERT(ucx_list_size(r->errors->next->next->begin) == 1, "500 list size != 1"); |
854 UCX_TEST_ASSERT(webdav_plist_size(r->errors->next->next->begin) == 1, "500 list size != 1"); |
855 |
855 |
856 // new resource for prop duplication tests |
856 // new resource for prop duplication tests |
857 r = (MSResponse*)ms->response.addresource((WebdavResponse*)ms, "/test"); |
857 r = (MSResponse*)ms->response.addresource((WebdavResponse*)ms, "/test"); |
858 UCX_TEST_ASSERT(r, "cannot create second response"); |
858 UCX_TEST_ASSERT(r, "cannot create second response"); |
859 |
859 |
865 UCX_TEST_ASSERT(!r->plist_begin->next, "dp1: adding dp2 should not work"); |
865 UCX_TEST_ASSERT(!r->plist_begin->next, "dp1: adding dp2 should not work"); |
866 |
866 |
867 r->resource.addproperty((WebdavResource*)r, &dp2, 404); |
867 r->resource.addproperty((WebdavResource*)r, &dp2, 404); |
868 UCX_TEST_ASSERT(!r->plist_begin->next, "dp1: adding dp2 with different status should not work (1)"); |
868 UCX_TEST_ASSERT(!r->plist_begin->next, "dp1: adding dp2 with different status should not work (1)"); |
869 if(r->errors) { |
869 if(r->errors) { |
870 UCX_TEST_ASSERT(ucx_list_size(r->errors->begin) == 0, "dp1: error list not empty"); |
870 UCX_TEST_ASSERT(webdav_plist_size(r->errors->begin) == 0, "dp1: error list not empty"); |
871 } |
871 } |
872 |
872 |
873 r->resource.addproperty((WebdavResource*)r, &dp3, 200); |
873 r->resource.addproperty((WebdavResource*)r, &dp3, 200); |
874 UCX_TEST_ASSERT(!r->plist_begin->next, "dp1: adding dp3 should not work"); |
874 UCX_TEST_ASSERT(!r->plist_begin->next, "dp1: adding dp3 should not work"); |
875 |
875 |