public void testGadgetSerialization() throws Exception { convertBackAndForth("<gadget url=\"http://www.example.com/gadget.xml\"></gadget>"); convertBackAndForth("<gadget url=\"http://www.example.com/gadget.xml\">" + "<pref value=\"value\"></pref>" + "</gadget>"); convertBackAndForth("<gadget url=\"http://www.example.com/gadget.xml\">" + "<state name=\"key\" value=\"value\"></state>" + "</gadget>"); }
public void testGadgetSerialization() throws Exception { convertBackAndForth("<gadget url=\"http://www.example.com/gadget.xml\"></gadget>"); convertBackAndForth("<gadget url=\"http://www.example.com/gadget.xml\">" + "<pref value=\"value\"></pref>" + "</gadget>"); convertBackAndForth("<gadget url=\"http://www.example.com/gadget.xml\">" + "<state name=\"key\" value=\"value\"></state>" + "</gadget>"); }
public void testRadiogroupSerialization() { convertBackAndForth("<radiogroup name=\"rgroup\"></radiogroup>"); }
public void testRadiogroupSerialization() { convertBackAndForth("<radiogroup name=\"rgroup\"></radiogroup>"); }
public void testButtonSerialization() { convertBackAndForth( "<button name=\"button\"><caption>button</caption><events></events></button>"); }
public void testTextareaSerialization() { convertBackAndForth( "<textarea name=\"lbl\"><line></line>line 1<line></line>line 2</textarea>"); }
public void testLabelSerialization() { convertBackAndForth("<label for=\"something\">label</label>"); }
public void testLineSerialization() { convertBackAndForth("<line i=\"2\" d=\"r\"></line>"); }
public void testTextareaSerialization() { convertBackAndForth( "<textarea name=\"lbl\"><line></line>line 1<line></line>line 2</textarea>"); }
public void testButtonSerialization() { convertBackAndForth( "<button name=\"button\"><caption>button</caption><events></events></button>"); }
public void testPasswordSerialization() { convertBackAndForth("<password name=\"lbl\" value=\"something\"></password>"); }
public void testPasswordSerialization() { convertBackAndForth("<password name=\"lbl\" value=\"something\"></password>"); }
public void testRadioSerialization() { convertBackAndForth("<radio name=\"radio\" group=\"group\"></radio>"); }
public void testInputSerialization() { convertBackAndForth("<input name=\"inputbox\">value</input>"); }
public void testLabelSerialization() { convertBackAndForth("<label for=\"something\">label</label>"); }
public void testLineSerialization() { convertBackAndForth("<line i=\"2\" d=\"r\"></line>"); }
public void testImgSerialization() { convertBackAndForth("<img src=\"http://www.example.com/image.png\"></img>"); convertBackAndForth( "<img src=\"http://www.example.com/image.png\" width=\"100\" height=\"20\"></img>"); Element element = createApiElementFromXml("<img src=\"http://www.example.com/image.png\"></img>"); assertTrue(element instanceof Image); assertEquals("http://www.example.com/image.png", ((Image) element).getUrl()); }
public void testImgSerialization() { convertBackAndForth("<img src=\"http://www.example.com/image.png\"></img>"); convertBackAndForth( "<img src=\"http://www.example.com/image.png\" width=\"100\" height=\"20\"></img>"); Element element = createApiElementFromXml("<img src=\"http://www.example.com/image.png\"></img>"); assertTrue(element instanceof Image); assertEquals("http://www.example.com/image.png", ((Image) element).getUrl()); }
public void testAttachmentSerialization() { convertBackAndForth("<image attachment=\"id\"></image>"); convertBackAndForth("<image attachment=\"id\"><caption>caption</caption></image>"); Element element = createApiElementFromXml( "<image attachment=\"id\"><gadge>something</gadge>" + "<caption>caption</caption><fake>fake</fake></image>", createWavelet("id")); assertTrue(element instanceof Attachment); assertEquals("caption", ((Attachment) element).getCaption()); assertEquals("id", ((Attachment) element).getAttachmentId()); assertEquals(ATTACHMENT_MIMETYPE, ((Attachment) element).getMimeType()); assertEquals(ATTACHMENT_URL, ((Attachment) element).getAttachmentUrl()); }
public void testAttachmentSerialization() { convertBackAndForth("<image attachment=\"id\"></image>"); convertBackAndForth("<image attachment=\"id\"><caption>caption</caption></image>"); Element element = createApiElementFromXml( "<image attachment=\"id\"><gadge>something</gadge>" + "<caption>caption</caption><fake>fake</fake></image>", createWavelet("id")); assertTrue(element instanceof Attachment); assertEquals("caption", ((Attachment) element).getCaption()); assertEquals("id", ((Attachment) element).getAttachmentId()); assertEquals(ATTACHMENT_MIMETYPE, ((Attachment) element).getMimeType()); assertEquals(ATTACHMENT_URL, ((Attachment) element).getAttachmentUrl()); }