Esempio n. 1
0
 public void testReplaceClassName() throws Exception {
   String oldName = "test2.ReplaceClassName2";
   String newName = "test2.ReplaceClassName3";
   CtClass cc = sloader.get("test2.ReplaceClassName");
   cc.replaceClassName(oldName, newName);
   cc.writeFile();
   CtClass cc2 = dloader.get(cc.getName());
   CtMethod m = cc2.getDeclaredMethod("foo");
   assertEquals(newName, m.getParameterTypes()[0].getName());
 }