001package org.w3.ldp.paging.testsuite.tests; 002 003import org.testng.annotations.Test; 004import org.w3.ldp.testsuite.annotations.SpecTest; 005import org.w3.ldp.testsuite.annotations.SpecTest.METHOD; 006import org.w3.ldp.testsuite.annotations.SpecTest.STATUS; 007import org.w3.ldp.testsuite.test.LdpTest; 008 009public abstract class PagingTest extends LdpTest{ 010 011 public static final String PAGING = "PAGING"; 012 public static final String SPEC_URI = "https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-paging.html"; 013 014 @Test( 015 groups = {MUST, PAGING}, 016 description = "LDP Paging clients MUST advertise their ability " 017 + "to support LDP Paging on all retrieval requests that normally " 018 + "result in a response containing a representation.") 019 @SpecTest( 020 specRefUri = SPEC_URI + "#ldpp-client-advertise", 021 testMethod = METHOD.NOT_IMPLEMENTED, 022 approval = STATUS.WG_PENDING) 023 public void testClientAdvertise() { 024 // TODO: Impl testClientAdvetrise 025 } 026 027 @Test( 028 groups = {MUST, PAGING}, 029 description = "LDP Paging clients MUST be capable of at least " 030 + "one of forward traversal and/or backward traversal.") 031 @SpecTest( 032 specRefUri = SPEC_URI + "#ldpp-client-traversal", 033 testMethod = METHOD.NOT_IMPLEMENTED, 034 approval = STATUS.WG_PENDING) 035 public void testPagingTraversal() { 036 // TODO: Impl testPagingTraversal 037 } 038 039 @Test( 040 groups = {MUST, PAGING}, 041 description = "LDP Paging clients MUST NOT assume that any " 042 + "in-sequence page resource's paging links will remain " 043 + "unchanged when the in-sequence page resource is retrieved " 044 + "more than once. Such an assumption would conflict with a " 045 + "server's ability to add pages to a sequence as the paged " 046 + "resource changes, for example.") 047 @SpecTest( 048 specRefUri = SPEC_URI + "#ldpr-pagingGET-sequences-change", 049 testMethod = METHOD.NOT_IMPLEMENTED, 050 approval = STATUS.WG_PENDING) 051 public void testSequenceChange() { 052 // TODO: Impl testSequenceChange 053 } 054 055 @Test( 056 groups = {MUST, PAGING}, 057 description = " LDP Paging clients MUST NOT assume that any in-sequence " 058 + "page resource's paging links will always be accessible. ") 059 @SpecTest( 060 specRefUri = SPEC_URI + "#dfn-ldp-paging-client", 061 testMethod = METHOD.NOT_IMPLEMENTED, 062 approval = STATUS.WG_PENDING) 063 public void testPagingAccess() { 064 // TODO: Impl testPagingAccess 065 } 066 067 @Test( 068 groups = {SHOULD, PAGING}, 069 description = "LDP Paging clients SHOULD NOT present paged resources " 070 + "as coherent or complete, or make assumptions to that effect.") 071 @SpecTest( 072 specRefUri = SPEC_URI + "#ldpp-client-paging-incomplete", 073 testMethod = METHOD.NOT_IMPLEMENTED, 074 approval = STATUS.WG_PENDING) 075 public void testResourcePresentation() { 076 // TODO: Impl testResourcePresentation 077 } 078 079 @Test( 080 groups = {SHOULD, PAGING}, 081 description = "LDP Paging servers SHOULD allow clients to retrieve large LDP-RSs in pages.") 082 @SpecTest( 083 specRefUri = SPEC_URI + "#ldpr-page-large", 084 testMethod = METHOD.NOT_IMPLEMENTED, 085 approval = STATUS.WG_PENDING) 086 public void testLargePage() { 087 // TODO: Impl testLargePage 088 } 089 090 @Test( 091 groups = {MAY, PAGING}, 092 description = "LDP Paging servers MAY treat any resource (LDP-RS or not) as a paged resource.") 093 @SpecTest( 094 specRefUri = SPEC_URI + "#dfn-ldp-paging-server", 095 testMethod = METHOD.NOT_IMPLEMENTED, 096 approval = STATUS.WG_PENDING) 097 public void testResourcePaging() { 098 // TODO: Impl testResourcePaging 099 } 100 101 @Test( 102 groups = {MAY, PAGING}, 103 description = "LDP Paging servers MAY vary their treatment of any resource " 104 + "(LDP-RS or not) as a paged resource over time. In other words, given " 105 + "two attempts to retrieve the same resource at different points in time, " 106 + "the server can choose to return a representation of the first page at " 107 + "one time and of the entire resource at a different time. Clients distinguish " 108 + "between these cases based on the status code and response headers.") 109 @SpecTest( 110 specRefUri = SPEC_URI + "#ldpr-split-any-time", 111 testMethod = METHOD.NOT_IMPLEMENTED, 112 approval = STATUS.WG_PENDING) 113 public void testSplitPaging() { 114 // TODO: Impl testSplitPaging 115 } 116 117 @Test( 118 groups = {SHOULD, PAGING}, 119 description = "LDP Paging servers SHOULD respect all of a client's LDP-Paging-defined " 120 + "hints, for example the largest page size the client is interested in processing, " 121 + "to influence the amount of data returned in representations.") 122 @SpecTest( 123 specRefUri = SPEC_URI + "#ldpp-prefer", 124 testMethod = METHOD.NOT_IMPLEMENTED, 125 approval = STATUS.WG_PENDING) 126 public void testPreferredPaging() { 127 // TODO: Impl testPreferredPaging 128 } 129 130 @Test( 131 groups = {MAY, PAGING}, 132 description = "LDP Paging servers MAY ignore a page size of zero, or unrecognized " 133 + "units, and process the request as if no maximum desired size was specified; " 134 + "in the latter case the server can select whatever page size it deems appropriate, " 135 + "or choose not to page the resource at all.") 136 @SpecTest( 137 specRefUri = SPEC_URI + "#ldpp-prefer-unrecognized", 138 testMethod = METHOD.NOT_IMPLEMENTED, 139 approval = STATUS.WG_PENDING) 140 public void testPreferUnrecognized() { 141 // TODO: Impl testPreferUnrecognized 142 } 143 144 @Test( 145 groups = {SHOULD, PAGING}, 146 description = "LDP Paging servers SHOULD respond with HTTP status code 2NN " 147 + "Contents of Related to successful GET requests with any paged resource " 148 + "as the Request-URI when the request indicates the client's support for " 149 + "that status code [2NN], although any appropriate code such as " 150 + "303 See Other MAY be used.") 151 @SpecTest( 152 specRefUri = SPEC_URI + "#ldpr-status-code", 153 testMethod = METHOD.NOT_IMPLEMENTED, 154 approval = STATUS.WG_PENDING) 155 public void testPagingGet() { 156 // TODO: Impl testPagingGet 157 } 158 159 @Test( 160 groups = {MUST, PAGING}, 161 description = "LDP Paging servers MUST ensure that all state present in the " 162 + "paged resource throughout a client's entire traversal operation is " 163 + "represented in at least one in-sequence page resource. In other words, " 164 + "whatever subset of the paged resource that is not added, updated, or " 165 + "removed during the client's traversal of its pages has to be present " 166 + "in one of the pages. ") 167 @SpecTest( 168 specRefUri = SPEC_URI + "#ldpr-guarantee-show-unchanged", 169 testMethod = METHOD.NOT_IMPLEMENTED, 170 approval = STATUS.WG_PENDING) 171 public void testShowUnchanged() { 172 // TODO: Impl testShowUnchanged 173 } 174 175 @Test( 176 groups = {MUST, PAGING}, 177 description = "LDP Paging servers MUST enable a client to detect any change " 178 + "to the paged resource that occurs while the client is retrieving " 179 + "pages by including a HTTP Link header on all successful HTTP GET responses. ") 180 @SpecTest( 181 specRefUri = SPEC_URI + "#ldpr-notify-changes", 182 testMethod = METHOD.NOT_IMPLEMENTED, 183 approval = STATUS.WG_PENDING) 184 public void testDetectChange() { 185 // TODO: Impl testDetectChange 186 // "Covers only part of the specification requirement. 187 // testPagingHeaders covers the rest." 188 } 189 190 @Test( 191 groups = {SHOULD, PAGING}, 192 description = "LDP Paging servers SHOULD include the same header on all 4xx " 193 + "status code responses. The link's context URI identifies the " 194 + "in-sequence page resource being retrieved, target URI identifies " 195 + "the paged resource, link relation type is canonical [REL-CANONICAL], " 196 + "and link extension parameters include the parameter name etag and a " 197 + "corresponding parameter value identical to the ETag [RFC7232] of " 198 + "the paged resource.") 199 @SpecTest( 200 specRefUri = SPEC_URI + "#ldpr-notify-changes", 201 testMethod = METHOD.NOT_IMPLEMENTED, 202 approval = STATUS.WG_PENDING) 203 public void testPagingHeaders() { 204 // TODO: Impl testPagingHeaders 205 // "Covers only part of the specification requirement. testDetectChange covers the rest." 206 } 207 208 @Test( 209 groups = {MAY, PAGING}, 210 description = "LDP Paging servers MAY add or remove in-sequence page resources " 211 + "to a paged resource's sequence over time, but SHOULD only add pages " 212 + "to the end of a sequence.") 213 @SpecTest( 214 specRefUri = SPEC_URI + "#ldpr-pagingGET-sequences-change", 215 testMethod = METHOD.NOT_IMPLEMENTED, 216 approval = STATUS.WG_PENDING) 217 public void testInSequencePaging() { 218 // TODO: Impl testInSequencePaging 219 // "Covers only part of the specification requirement. 220 // testPageAddEnd covers the rest." 221 } 222 223 @Test( 224 groups = {SHOULD, PAGING}, 225 description = "LDP Paging servers SHOULD only add pages " 226 + "to the end of a sequence.") 227 @SpecTest( 228 specRefUri = SPEC_URI + "#ldpr-pagingGET-sequences-change", 229 testMethod = METHOD.NOT_IMPLEMENTED, 230 approval = STATUS.WG_PENDING) 231 public void testPageAddEnd() { 232 // TODO: Impl testPageAddEnd 233 // "Covers only part of the specification requirement. 234 // testInSequencePaging covers the rest." 235 } 236 237 @Test( 238 groups = {MAY, PAGING}, 239 description = "LDP Paging servers MAY provide a first page link when " 240 + "responding to requests with any in-sequence page resource " 241 + "as the Request-URI.") 242 @SpecTest( 243 specRefUri = SPEC_URI + "#ldpr-pagingGET-first-allowed-onpages", 244 testMethod = METHOD.NOT_IMPLEMENTED, 245 approval = STATUS.WG_PENDING) 246 public void testAllowFirstLink() { 247 // TODO: Impl testAllowFirstLink 248 } 249 250 @Test( 251 groups = {MAY, PAGING}, 252 description = "LDP Paging servers MAY provide a last page link in responses " 253 + "to GET requests with any in-sequence page resource as the Request-URI.") 254 @SpecTest( 255 specRefUri = SPEC_URI + "#ldpr-pagingGET-last-allowed-onpages", 256 testMethod = METHOD.NOT_IMPLEMENTED, 257 approval = STATUS.WG_PENDING) 258 public void testAllowLastLink() { 259 // TODO: Impl testAllowLastLink 260 } 261 262 @Test( 263 groups = {MUST, PAGING}, 264 description = "LDP Paging servers MUST provide a next page link in responses to " 265 + "GET requests with any in-sequence page resource other than the final " 266 + "page as the Request-URI. This is the mechanism by which clients can " 267 + "discover the URL of the next page.") 268 @SpecTest( 269 specRefUri = SPEC_URI + "#dfn-in-sequence-page-resource", 270 testMethod = METHOD.NOT_IMPLEMENTED, 271 approval = STATUS.WG_PENDING) 272 public void testSequenced() { 273 // TODO: Impl testSequenced 274 } 275 276 @Test( 277 groups = {MUST, PAGING}, 278 description = "LDP Paging servers MUST NOT provide a next page link in responses " 279 + "to GET requests with the final in-sequence page resource as the " 280 + "Request-URI. This is the mechanism by which clients can discover the end " 281 + "of the page sequence as currently known by the server.") 282 @SpecTest( 283 specRefUri = SPEC_URI + "#ldpr-pagingGET-lastnext-prohibited", 284 testMethod = METHOD.NOT_IMPLEMENTED, 285 approval = STATUS.WG_PENDING) 286 public void testRestrictFinalLink() { 287 // TODO: Impl testRestrictFinalLink 288 } 289 290 @Test( 291 groups = {MAY, PAGING}, 292 description = "LDP Paging servers MAY provide a previous page link in responses to " 293 + "GET requests with any in-sequence page resource other than the first page " 294 + "as the Request-URI. This is one mechanism by which clients can discover " 295 + "the URL of the previous page.") 296 @SpecTest( 297 specRefUri = SPEC_URI + "#ldpr-pagingGET-prev-allowed", 298 testMethod = METHOD.NOT_IMPLEMENTED, 299 approval = STATUS.WG_PENDING) 300 public void testGetPreviousLink() { 301 // TODO: Impl testGetPreviousLink 302 } 303 304 @Test( 305 groups = {MUST, PAGING}, 306 description = "LDP Paging servers MUST NOT provide a previous page link in responses to " 307 + "GET requests with the first in-sequence page resource as the Request-URI. " 308 + "This is one mechanism by which clients can discover the beginning of the page " 309 + "sequence as currently known by the server.") 310 @SpecTest( 311 specRefUri = SPEC_URI + "#ldpr-pagingGET-firstprev-prohibited", 312 testMethod = METHOD.NOT_IMPLEMENTED, 313 approval = STATUS.WG_PENDING) 314 public void testRestrictFirstLink() { 315 // TODO: Impl testRestrictFirstLink 316 } 317 318 @Test( 319 groups = {MUST, PAGING}, 320 description = "LDP Paging servers MUST provide an HTTP Link header whose target URI " 321 + "is http://www.w3.org/ns/ldp#Page, and whose link relation type is type " 322 + "[RFC5988] in responses to GET requests with any in-sequence page resource " 323 + "as the Request-URI. This is one mechanism by which clients know that the " 324 + "resource is one of a sequence of pages.") 325 @SpecTest( 326 specRefUri = SPEC_URI + "#ldpr-pagingGET-page-type-reqd", 327 testMethod = METHOD.NOT_IMPLEMENTED, 328 approval = STATUS.WG_PENDING) 329 public void testGetPageReq() { 330 // TODO: Impl testGetPageReq 331 } 332 333 @Test( 334 groups = {MUST, PAGING}, 335 description = "LDP Paging servers MUST NOT initiate paging unless the client has " 336 + "indicated it understands paging. The only standard means defined by LDP " 337 + "paging for a client to signal a server that the client understands paging " 338 + "is via the client preference defined for this purpose; other " 339 + "implementation-specific means could also be used.") 340 @SpecTest( 341 specRefUri = SPEC_URI + "#ldpr-pagingGET-only-paging-clients", 342 testMethod = METHOD.NOT_IMPLEMENTED, 343 approval = STATUS.WG_PENDING) 344 public void testGetOnlyPagingClients() { 345 // TODO: Impl testGetOnlyPagingClients 346 } 347 348 @Test( 349 groups = {MUST, PAGING}, 350 description = "LDP Paging servers MUST ensure that the membership triple and " 351 + "containment triple for each member are part of the same in-sequence " 352 + "page resource, whenever both triples are present in the page " 353 + "sequence for a paged LDPC.") 354 @SpecTest( 355 specRefUri = SPEC_URI + "#ldpc-onsamepage", 356 testMethod = METHOD.NOT_IMPLEMENTED, 357 approval = STATUS.WG_PENDING) 358 public void testMembershipSequence() { 359 // TODO: Impl testMembershipSequence 360 } 361 362 @Test( 363 groups = {MUST, PAGING}, 364 description = "LDP Paging servers MAY communicate the order it uses to allocate LDPC members to " 365 + "in-sequence page resources as part of the pages' representations; " 366 + "LDP Paging does not specify ordering for pages of LDPRs in other cases.") 367 @SpecTest( 368 specRefUri = SPEC_URI + "#ldpc-sortcriteriaobj", 369 testMethod = METHOD.NOT_IMPLEMENTED, 370 approval = STATUS.WG_PENDING) 371 public void testSortMembers() { 372 // TODO: Impl testSortMembers 373 // "Covers only part of the specification requirement. 374 // testPageAddEnd covers the rest." 375 } 376 377 @Test( 378 groups = {MUST, PAGING}, 379 description = "If the server communicates this (ordering), it MUST specify the order using " 380 + "a triple whose subject is the page URI, whose predicate is ldp:containerSortCriteria, " 381 + "and whose object is a rdf:List of ldp:containerSortCriterion resources. " 382 + "The resulting order MUST be as defined by SPARQL SELECT’s ORDER BY clause " 383 + "[sparql11-query]. Sorting criteria MUST be the same for all pages of a representation; " 384 + "if the criteria were allowed to vary, the ordering among members of a container " 385 + "across pages would be undefined.") 386 @SpecTest( 387 specRefUri = SPEC_URI + "#ldpc-sortcriteriaobj", 388 testMethod = METHOD.NOT_IMPLEMENTED, 389 approval = STATUS.WG_PENDING) 390 public void testSortTriples() { 391 // TODO: Impl testSortTriples 392 // "Covers only part of the specification requirement. 393 // testSortMembers covers the rest." 394 } 395 396 @Test( 397 groups = {MUST, PAGING}, 398 description = "LDPC page representations ordered using ldp:containerSortCriteria MUST contain, " 399 + "in every ldp:containerSortCriterion list entry, a triple whose subject is the sort " 400 + "criterion identifier, whose predicate is ldp:containerSortPredicate and whose object " 401 + "is the predicate whose value is used to order members between pages " 402 + "(the page-ordering values).") 403 @SpecTest( 404 specRefUri = SPEC_URI + "#ldpc-sortliteraltype", 405 testMethod = METHOD.NOT_IMPLEMENTED, 406 approval = STATUS.WG_PENDING) 407 public void testSortCriteria() { 408 // TODO: Impl testSortCriteria 409 } 410 411 @Test( 412 groups = {MUST, PAGING}, 413 description = "LDPC page representations ordered using ldp:containerSortCriteria MUST contain, " 414 + "in every ldp:containerSortCriterion list entry, a triple whose subject is the sort " 415 + "criterion identifier, whose predicate is ldp:containerSortOrder and whose object " 416 + "describes the order used. LDP defines two values, ldp:Ascending and ldp:Descending, " 417 + "for use as the object of this triple. Other values can be used, but LDP assigns no " 418 + "meaning to them and interoperability will be limited.") 419 @SpecTest( 420 specRefUri = SPEC_URI + "#ldpc-sortorder", 421 testMethod = METHOD.NOT_IMPLEMENTED, 422 approval = STATUS.WG_PENDING) 423 public void testSortOrder() { 424 // TODO: Impl testSortOrder 425 } 426 427 @Test( 428 groups = {MAY, PAGING}, 429 description = "LDPC page representations ordered using ldp:containerSortCriteria MAY contain, " 430 + "in any ldp:containerSortCriterion list entry, a triple whose subject is the sort " 431 + "criterion identifier, whose predicate is ldp:containerSortCollation and whose object " 432 + "identifies the collation used.") 433 @SpecTest( 434 specRefUri = SPEC_URI + "#ldpc-sortcollation", 435 testMethod = METHOD.NOT_IMPLEMENTED, 436 approval = STATUS.WG_PENDING) 437 public void testSortCollation() { 438 // TODO: Impl testSortCollation 439 // "Covers only part of the specification requirement. 440 // testRestrictCollation covers the rest." 441 } 442 443 @Test( 444 groups = {MUST, PAGING}, 445 description = "The ldp:containerSortCollation triple MUST be omitted for comparisons involving " 446 + "page-ordering values for which [sparql11-query] does not use collations.") 447 @SpecTest( 448 specRefUri = SPEC_URI + "#ldpc-sortcollation", 449 testMethod = METHOD.NOT_IMPLEMENTED, 450 approval = STATUS.WG_PENDING) 451 public void testRestrictCollation() { 452 // TODO: Impl testRestrictCollation 453 // "Covers only part of the specification 454 // requirement. testSortCollation covers the rest." 455 } 456 457}