public void testEscape() { Hash h = new Hash("key", "<&>"); assertEquals(" key=\"<&>\"", h.asCharSequence()); }
public void testJavascriptInt() { Hash h = new Hash("int", 42); assertEquals("{int:42}", h.toJavascript()); }
public void testMultiKey() { Hash h = new Hash("key", "value", "key2", "value2"); assertTrue(h.toJavascript().indexOf("value2") != -1); }
public void testJavascriptBoolean() { Hash h = new Hash("bool", true); assertEquals("{bool:true}", h.toJavascript()); }
public void testJavascript() { Hash h = new Hash("key", "value"); assertEquals("{key:'value'}", h.toJavascript()); }