@Test(expected = ServiceRuntimeException.class) public void testWithNoFilter() { org.oskari.csw.request.GetRecords.createRequest(null); fail("Should have thrown exception"); }
public static String createRequest(Filter filter) { if (filter == null) { throw new ServiceRuntimeException("Filter is required"); } final StringWriter writer = new StringWriter(); XMLStreamWriter xsw = getXMLWriter(writer); startDocument(xsw); writeRawXMLUnsafe(xsw, writer, getFilterAsString(filter)); endDocument(xsw); return writer.toString(); }
GetRecords { public static String createRequest(Filter filter) { if (filter == null) { throw new ServiceRuntimeException("Filter is required"); } final StringWriter writer = new StringWriter(); XMLStreamWriter xsw = getXMLWriter(writer); startDocument(xsw); writeRawXMLUnsafe(xsw, writer, getFilterAsString(filter)); endDocument(xsw); return writer.toString(); } }
GetRecords { public static String createRequest(Filter filter) { if (filter == null) { throw new ServiceRuntimeException("Filter is required"); } final StringWriter writer = new StringWriter(); XMLStreamWriter xsw = getXMLWriter(writer); startDocument(xsw); writeRawXMLUnsafe(xsw, writer, getFilterAsString(filter)); endDocument(xsw); return writer.toString(); } private  GetRecords(); }
GetRecords { public static String createRequest(Filter filter) { if (filter == null) { throw new ServiceRuntimeException("Filter is required"); } final StringWriter writer = new StringWriter(); XMLStreamWriter xsw = getXMLWriter(writer); startDocument(xsw); writeRawXMLUnsafe(xsw, writer, getFilterAsString(filter)); endDocument(xsw); return writer.toString(); } private  GetRecords(); static String createRequest(Filter filter); }
GetRecords { public static String createRequest(Filter filter) { if (filter == null) { throw new ServiceRuntimeException("Filter is required"); } final StringWriter writer = new StringWriter(); XMLStreamWriter xsw = getXMLWriter(writer); startDocument(xsw); writeRawXMLUnsafe(xsw, writer, getFilterAsString(filter)); endDocument(xsw); return writer.toString(); } private  GetRecords(); static String createRequest(Filter filter);  }