"</APPLET>\n"+
"</HTML>";
createParser(testHTML);
parseAndAssertNodeCount(3);
assertTrue("Node should be an applet tag",node[0] instanceof AppletTag);
AppletTag appletTag = (AppletTag)node[0];
paramsMap = new Hashtable();
String [][] newparamsData = {{"First","One"},{"Second","Two"},{"Third","3"}};
for (int i = 0;i<paramsData.length;i++)
{
paramsMap.put(newparamsData[i][0],newparamsData[i][1]);
}
appletTag.setAppletParams (paramsMap);
// Check the data in the applet tag
String expectedRawString =
"<APPLET CODE=Myclass.class ARCHIVE=test.jar CODEBASE=www.kizna.com>\n"+
"<PARAM VALUE=\"Two\" NAME=\"Second\">"+ // note these are out of orer because of the hashtable
"<PARAM VALUE=\"One\" NAME=\"First\">"+
"<PARAM VALUE=\"3\" NAME=\"Third\">"+
"</APPLET>";
String actual = appletTag.toHtml();
assertStringEquals("toHTML()",expectedRawString,actual);
}