assertEquals(SortOrder.DESCENDING, sorts[1].getSortOrder());
}
@Test
public void testParseGetRecordsFilterSimple() throws Exception {
GetRecordsType gr = (GetRecordsType) parser.parse(getClass().getResourceAsStream(
"GetRecordsFilterSimple.xml"));
// check the attributes
assertEquals("CSW", gr.getService());
assertEquals("2.0.2", gr.getVersion());
assertEquals("application/xml", gr.getOutputFormat());
assertEquals("http://www.opengis.net/cat/csw/2.0.2", gr.getOutputSchema());
assertEquals(new Integer(1), gr.getStartPosition());
assertEquals(new Integer(5), gr.getMaxRecords());
assertEquals(ResultType.RESULTS, gr.getResultType());
// the query
QueryType query = (QueryType) gr.getQuery();
List<QName> expected = new ArrayList<QName>();
expected.add(new QName("http://www.opengis.net/cat/csw/2.0.2", "Record"));
assertEquals(expected, query.getTypeNames());
// the element names