147 ct.generate(); |
147 ct.generate(); |
148 |
148 |
149 //step 3: move a classfile from the temp folder to the test subfolder |
149 //step 3: move a classfile from the temp folder to the test subfolder |
150 File fileToMove = new File(tmpDir, tk.targetClass); |
150 File fileToMove = new File(tmpDir, tk.targetClass); |
151 File target = new File(destDir, tk.targetClass); |
151 File target = new File(destDir, tk.targetClass); |
|
152 target.delete(); |
152 boolean success = fileToMove.renameTo(target); |
153 boolean success = fileToMove.renameTo(target); |
153 |
154 |
154 if (!success) { |
155 if (!success) { |
155 throw new AssertionError("error when moving file " + tk.targetClass); |
156 throw new AssertionError("error when moving file " + tk.targetClass); |
156 } |
157 } |