* Verifies that the method
* <code>{@link XmlRpcRequestParser#parseRequest(InputStream)}</code> parses
* correctly a XML-RPC request containing boolean parameters.
*/
public final void testParseRequestWithBooleanParameters() {
XmlRpcBoolean[] parameters = { new XmlRpcBoolean(Boolean.TRUE),
new XmlRpcBoolean(Boolean.FALSE) };
XmlRpcRequest expected = new XmlRpcRequest(this.serviceName,
this.methodName, parameters);
StringBuffer builder = new StringBuffer();
builder.append("<?xml version=\"1.0\"?>");
builder.append("<methodCall><methodName>");
builder.append(this.serviceAndMethodNames);
builder.append("</methodName><params>");
int parameterCount = parameters.length;
for (int i = 0; i < parameterCount; i++) {
XmlRpcBoolean xmlRpcBoolean = parameters[i];
Boolean value = (Boolean) xmlRpcBoolean.getValue();
builder.append("<param><value><boolean>");
builder.append(value.booleanValue() ? "1" : "0");
builder.append("</boolean></value></param>");
}