Exemplo n.º 1
0
 @Test
 public void testaddToFieldBufferNothing()
     throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException,
         SecurityException {
   String toAdd = "";
   UMLArrows arrows = UMLArrows.getInstance();
   Field fieldBuffer = UMLArrows.class.getDeclaredField("fieldBuffer");
   fieldBuffer.setAccessible(true);
   StringBuffer currentBuffer = (StringBuffer) fieldBuffer.get(arrows);
   String newBuffer = (currentBuffer.toString() + toAdd);
   arrows.addToFieldBuffer(toAdd);
   assertEquals(newBuffer, fieldBuffer.get(arrows).toString());
 }