Esempio n. 1
0
 @Test
 public void testIdVariable() throws Exception {
   String xml = "<charm id=\"otherTest\"/>";
   Element rootElement = DocumentUtilities.read(xml).getRootElement();
   String id = builder.build(rootElement);
   assertEquals("otherTest", id);
 }
Esempio n. 2
0
 @Test(expected = CharmException.class)
 public void testBadId() throws Exception {
   String xml = "<charm id=\"\"/>";
   Element rootElement = DocumentUtilities.read(xml).getRootElement();
   builder.build(rootElement);
 }