Skip to content

Commit

Permalink
Fix #25: Reset request entity between requests
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmartell committed May 2, 2016
1 parent 0248326 commit 53f4d4d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,15 @@ public void findNillableProperties(ITestContext testContext) {
this.nillableProperties.put(typeName, nillableProps);
}
}
TestSuiteLogger.log(Level.FINE, "Nillable properties:\n"
+ this.nillableProperties);
}

/**
* [{@code Test}] Submits a GetFeature request containing a
* {@code PropertyIsNil} predicate designating a nillable feature property
* (the last one in document order). The response entity must include only
* feature instances that include the specified property with
* (one per feature type). The response entity must include only feature
* instances that include the specified property with
* {@literal @xsi:nil="true"}.
*
* <p>
Expand All @@ -109,10 +111,12 @@ public void propertyIsNil(ProtocolBinding binding) {
"No feature type for which instances exist has nillable properties"));
}
for (QName typeName : this.nillableProperties.keySet()) {
this.reqEntity = WFSRequest.createRequestEntity(
GET_FEATURE_MINIMAL, this.wfsVersion);
List<XSElementDeclaration> nillables = this.nillableProperties
.get(typeName);
WFSRequest.appendSimpleQuery(this.reqEntity, typeName);
// get last nillable property in document order
// get last nillable property for this feature type
XSElementDeclaration prop = nillables.get(nillables.size() - 1);
QName propName = new QName(prop.getNamespace(), prop.getName());
addPropertyIsNilPredicate(this.reqEntity, propName, null, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ public void buildRequestEntity() {
}

/**
* Eliminate obsolete reference to previous response entity.
* Discard previous response entity.
*/
@BeforeMethod
public void clearResponseEntity() {
public void discardResponseEntity() {
this.rspEntity = null;
}

Expand Down
8 changes: 6 additions & 2 deletions src/site/xhtml/changelog.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
<body>
<h1>Release Notes</h1>

<h2>1.22 (2016-MM-DD)</h2>
<h2>1.22 (2016-05-02)</h2>
<p>This release includes the following fixes and enhancements:</p>
<ul>
<li style="list-style:square">Support testing of WFS 2.0.2 implementations (OGC 09-025r2)</li>
<li style="list-style:square">Support testing of WFS 2.0.2 implementations (<a target="_blank"
href="http://docs.opengeospatial.org/is/09-025r2/09-025r2.html">OGC 09-025r2</a>)</li>
<li style="list-style:square">Fix <a target="_blank"
href="https://github.com/opengeospatial/ets-wfs20/issues/26">issue #26</a>:
Failed precondition when media type is invalid.</li>
<li style="list-style:square">Fix <a target="_blank"
href="https://github.com/opengeospatial/ets-wfs20/issues/25">issue #25</a>:
propertyIsNil test submits invalid request entity (POST).</li>
</ul>

<h2>1.21 (2016-02-16)</h2>
Expand Down

0 comments on commit 53f4d4d

Please sign in to comment.