public class LockFeatureTests extends LockingFixture
Sources
dataSampler, locks, storedQueryIddocBuilder, ETS_PKG, featureInfo, featureTypes, reqEntity, rspEntity, supportedBindings, TNS_PREFIX, wfsClient, wfsMetadata, wfsVersion| Constructor and Description |
|---|
LockFeatureTests() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildSimpleLockFeatureRequest()
Builds a DOM Document representing a LockFeature request entity.
|
(package private) Map<String,QName> |
fetchRandomFeatureIdentifier(Map<QName,FeatureTypeInfo> featureInfo)
Obtains the system-assigned identifier of an instance of some randomly
selected feature type.
|
void |
lockAllFeaturesByType(ProtocolBinding binding,
QName featureType)
[
Test] Locks all feature instances of a given type using default
values for all locking options. |
void |
lockFeatureAlreadyLocked()
[
Test] A feature instance may be locked by only one lock. |
void |
lockFeatureAndAttemptDelete()
[
Test] Submits a request to lock a feature instance; within this
interval an attempt to delete the instance without the correct lock
identifier should fail with exception code MissingParameterValue. |
void |
resetNonexistentLock()
[
Test] An attempt to reset a non-existent lock should produce a
service exception with error code "LockHasExpired" and HTTP status code
403 (Forbidden). |
(package private) static QName |
selectRandomFeatureType(Map<QName,FeatureTypeInfo> featureTypes)
Randomly selects a feature type name for which instances are available in
the SUT.
|
initLockingFixture, releaseAllLocksaddAttributesOnTestFailure, allProtocolsAndFeatureTypes, bindingAndAvailFeatureTypeProductSet, extractBodyAsDocument, getFeatureTypes, getInstantiatedFeatureTypes, getProtocolBindings, initBaseFixture, initParser, setWfsClientpublic void buildSimpleLockFeatureRequest()
public void resetNonexistentLock()
Test] An attempt to reset a non-existent lock should produce a
service exception with error code "LockHasExpired" and HTTP status code
403 (Forbidden).
Note: The WFS2 specification makes no distinction
between a non-existent and an expired lock in this context. The error
code InvalidLockId would seem more appropriate here but that may
only appear in a Transaction response according to Table 3.
Sources
public void lockFeatureAndAttemptDelete()
Test] Submits a request to lock a feature instance; within this
interval an attempt to delete the instance without the correct lock
identifier should fail with exception code MissingParameterValue.
Sources
public void lockFeatureAlreadyLocked()
Test] A feature instance may be locked by only one lock. An
attempt to establish another lock should fail with exception code
CannotLockAllFeatures if lockAction = "ALL" (the default value).
Sources
public void lockAllFeaturesByType(ProtocolBinding binding, QName featureType)
Test] Locks all feature instances of a given type using default
values for all locking options. If no data exist for a given feature type
it is skipped. The response entity must include a lockId attribute and
the wfs:FeaturesLocked element. The wfs:FeatureNotLocked element must not
be present.
Sources
binding - The ProtocolBinding to use for the request.featureType - A QName object denoting the feature type name.Map<String,QName> fetchRandomFeatureIdentifier(Map<QName,FeatureTypeInfo> featureInfo)
featureInfo - A Map containing information about supported feature types,
keyed by type name (QName).static QName selectRandomFeatureType(Map<QName,FeatureTypeInfo> featureTypes)
featureTypes - A Map containing information about supported feature types,
keyed by type name (QName).null if no data exist in the SUT.Copyright © 2016 Open Geospatial Consortium. All rights reserved.