Exemplo 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);
 }
Exemplo 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);
 }