コード例 #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);
 }
コード例 #2
0
 @Test(expected = CharmException.class)
 public void testBadId() throws Exception {
   String xml = "<charm id=\"\"/>";
   Element rootElement = DocumentUtilities.read(xml).getRootElement();
   builder.build(rootElement);
 }