/**
* WICKET-65 Handle String array in PageParameters
*/
public void testEncodeStringArray()
{
WebRequestCodingStrategy wrcs = new WebRequestCodingStrategy();
WicketTester app = new WicketTester();
app.startPage(MockPage.class);
PageParameters params = new PageParameters();
params.add("a", "1");
params.add("a", "2");
BookmarkablePageRequestTarget requestTarget = new BookmarkablePageRequestTarget(
MockPage.class, params);
app.setupRequestAndResponse();
CharSequence cs = wrcs.encode(app.createRequestCycle(), requestTarget);
assertEquals(
"?wicket:bookmarkablePage=:org.apache.wicket.protocol.http.MockPage&a=1&a=2", cs
.toString());
app.destroy();
}