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