public class GetRecordByIdTests extends CommonFixture
GetRecordById request. This
request implements the abstract GetResourceByID operation defined in
the OGCWebService interface (OGC 06-121r9, Figure C.2).
The KVP syntax must be supported; this encoding is generally used with the GET method but may also be used with the POST method; this latter capability will be advertised in the capabilities document as an operational constraint as indicated below. The media type of a KVP request entity is "application/x-www-form-urlencoded".
<Post xmlns="http://www.opengis.net/ows/2.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="http://cat.example.org/csw">
<Constraint name="PostEncoding">
<AllowedValues>
<Value>KVP</Value>
</AllowedValues>
</Constraint>
</Post>
Sources
atomSchema, client, cswCapabilities, cswSchema, request, response, ROOT_PKG_PATH, SCHEMATRON_ATOM| Constructor and Description |
|---|
GetRecordByIdTests() |
| Modifier and Type | Method and Description |
|---|---|
void |
findRequestEndpoints()
Finds the GET and POST method endpoints for the GetCapabilities request
in the capabilities document.
|
void |
getBriefRecordById()
[Test] Verifies that a request for a brief record by identifier produces
a matching csw:BriefRecord in the response entity.
|
void |
getFullRecordById()
[Test] Verifies that a request for a full record by identifier produces a
matching csw:Record in the response entity.
|
void |
getRecordById_noMatch()
[Test] Verifies that a request for a record by identifier produces a
response with status code 404 (Not Found) if no matching resource
representation is found.
|
void |
getRecordByIdAsAtomEntryUsingAcceptHeader()
[Test] Verifies that a request for an Atom representation of a record
produces a matching atom:entry in the response entity.
|
void |
getRecordByIdAsAtomEntryUsingOutputFormat()
[Test] Verifies that a request for an Atom representation of a record
produces a matching atom:entry in the response entity.
|
void |
getRecordByIdWithMissingId()
[Test] Verifies that a request for a record that omits the required 'id'
parameter produces an exception report containing the exception code
"MissingParameterValue".
|
void |
getRecordByIdWithUnsupportedFormat()
[Test] Verifies that a request for a record representation in an
unsupported format (media type) produces an exception report containing
the exception code "InvalidParameterValue".
|
void |
getRecordByIdWithUnsupportedSchema()
[Test] Verifies that a request for a record that conforms to an
unsupported output schema produces an exception report containing the
exception code "InvalidParameterValue".
|
void |
getRecordIdentifiers(org.testng.ITestContext testContext)
Gets the record identifiers that occur in the sample data obtained from
the SUT.
|
void |
getSummaryRecordById()
[Test] Verifies that a request for a record by identifier produces a
matching csw:SummaryRecord in the response entity.
|
(package private) void |
setIdList(List<String> idList) |
buildGetRequest, clearMessages, getResponseEntityAsDocument, initCommonFixturepublic void findRequestEndpoints()
public void getRecordIdentifiers(org.testng.ITestContext testContext)
testContext - The test context containing various suite attributes.public void getRecordById_noMatch()
public void getSummaryRecordById()
public void getBriefRecordById()
public void getFullRecordById()
public void getRecordByIdAsAtomEntryUsingAcceptHeader()
Accept request header indicates a preference for Atom
content; the outputFormat parameter is omitted (thus the header value
applies). The content of the entry must conform to RFC 4287.
The atom:entry element is expected to include a dc:identifier element in accord with the mappings given in OGC 10-032r8, Table 7.
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"> <id>http://csw.example.org/record/ff711198-b30f-11e4-a71e-12e3f512a338</id> <title>Title</title> <updated>2015-02-12T23:46:57Z</updated> <dc:identifier>ff711198-b30f-11e4-a71e-12e3f512a338</dc:identifier> </entry>
Sources
public void getRecordByIdAsAtomEntryUsingOutputFormat()
public void getRecordByIdWithUnsupportedFormat()
public void getRecordByIdWithUnsupportedSchema()
public void getRecordByIdWithMissingId()
Copyright © 2018 Open Geospatial Consortium. All rights reserved.