public abstract class CommonResourceTest extends LdpTest
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
auth |
DEFAULT_MODEL_TYPE, df, HTTP_LOG_FILENAME, httpLog, MANUAL, MAY, MUST, SHOULD, skipLog, SKIPPED_LOG_FILENAME
Constructor and Description |
---|
CommonResourceTest(String auth) |
Modifier and Type | Method and Description |
---|---|
void |
addFailureToHttpLog(org.testng.ITestResult result) |
protected com.jayway.restassured.specification.RequestSpecification |
buildBaseRequestSpecification()
Build a base RestAssured
RequestSpecification . |
void |
determineOptions() |
protected abstract String |
getResourceUri() |
protected void |
skipIfMethodNotAllowed(HttpMethod method) |
protected boolean |
supports(HttpMethod method) |
void |
testAcceptPatchHeader() |
void |
testConditionFailedStatusCode() |
void |
testETagHeadersGet() |
void |
testETagHeadersHead() |
void |
testGetResource() |
void |
testGetResponseHeaders() |
void |
testHead() |
void |
testIsHttp11Manual() |
void |
testLdpLinkHeader() |
void |
testOptions() |
void |
testOptionsAllowHeader() |
void |
testPreconditionRequiredStatusCode() |
void |
testPutBadETag() |
void |
testPutRequiresIfMatch() |
checkPreferenceAppliedHeader, commonSetup, commonTearDown, containsLinkHeader, getAsModel, getDefaultModel, getFirstLinkForRelation, getPrimaryTopic, getResourceAsModel, hasReturnRepresentation, include, omit, postContent, readModel, resolveIfRelative, resolveIfRelative, restrictionsOnPostContent, splitLinks
public CommonResourceTest(String auth) throws IOException
IOException
protected abstract String getResourceUri()
public void determineOptions()
public void addFailureToHttpLog(org.testng.ITestResult result)
protected com.jayway.restassured.specification.RequestSpecification buildBaseRequestSpecification()
LdpTest
RequestSpecification
.buildBaseRequestSpecification
in class LdpTest
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-gen-http", testMethod=MANUAL, approval=WG_APPROVED, comment="Covers only part of the specification requirement. testIsHttp11Server covers the rest.") public void testIsHttp11Manual() throws URISyntaxException
URISyntaxException
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-gen-etags", testMethod=AUTOMATED, approval=WG_APPROVED, comment="Covers only part of the specification requirement. testETagHeadersHead covers the rest.") public void testETagHeadersGet()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-gen-etags", testMethod=AUTOMATED, approval=WG_APPROVED, comment="Covers only part of the specification requirement. testETagHeadersGet covers the rest.") public void testETagHeadersHead()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-gen-linktypehdr", testMethod=AUTOMATED, approval=WG_APPROVED) public void testLdpLinkHeader()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-get-must", testMethod=AUTOMATED, approval=WG_APPROVED) public void testGetResource()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-get-options", testMethod=AUTOMATED, approval=WG_APPROVED) public void testGetResponseHeaders()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-put-precond", testMethod=AUTOMATED, approval=WG_APPROVED, comment="Covers only part of the specification requirement. testConditionFailedStatusCode, testPreconditionRequiredStatusCode and testPutBadETag covers the rest.") public void testPutRequiresIfMatch() throws URISyntaxException
URISyntaxException
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-put-precond", testMethod=AUTOMATED, approval=WG_APPROVED, comment="Covers only part of the specification requirement. testPutBadETag, testPreconditionRequiredStatusCode and testPutRequiresIfMatch covers the rest.") public void testConditionFailedStatusCode()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-put-precond", testMethod=AUTOMATED, approval=WG_APPROVED, comment="Covers only part of the specification requirement. testConditionFailedStatusCode, testPutBadETagand testPutRequiresIfMatch covers the rest.") public void testPreconditionRequiredStatusCode()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-put-precond", testMethod=AUTOMATED, approval=WG_APPROVED, comment="Covers only part of the specification requirement. testConditionFailedStatusCode, testPreconditionRequiredStatusCode and testPutRequiresIfMatch covers the rest.") public void testPutBadETag()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-head-must", testMethod=AUTOMATED, approval=WG_APPROVED) public void testHead()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-patch-acceptpatch", testMethod=AUTOMATED, approval=WG_APPROVED) public void testAcceptPatchHeader()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-options-must", testMethod=AUTOMATED, approval=WG_APPROVED) public void testOptions()
@SpecTest(specRefUri="http://www.w3.org/TR/ldp#ldpr-options-allow", testMethod=AUTOMATED, approval=WG_APPROVED) public void testOptionsAllowHeader()
protected boolean supports(HttpMethod method)
protected void skipIfMethodNotAllowed(HttpMethod method)
Copyright © 2014 World Wide Web Consortium (W3C). All rights reserved.