Closed pandzel-zz closed 9 years ago
The expression looks ok. It counts the number of SummaryRecord elements that contain at least one dc:subject child element. So the assertion will fail only if there is a record without dc:subject.
Now, dc:subject is an optional property. If no value exists is an empty dc:subject element to be expected in the response? If not, then the test will have to select dc:title instead (which is a required element)--and verify that no other optional elements are present.
The test is: "count(csw:SummaryRecord[dc:subject]) = ./@numberOfRecordsReturned". However, considering that it might be more than one dc:subject in the record, shouldn't it rather be: "count(csw:SummaryRecord[dc:subject]) >= ./@numberOfRecordsReturned" ?