[BLUEJ-135] import in codepad needs to be manually added to unit test class
It is allowed in the codepad to import from the java libraries, e.g. {noformat}
import java.util.ArrayList; new ArrayList()
- drag to bench and name 'arr' *
arr.add("foo"); {noformat} Furthermore, I can then call "object bench to test fixture" to store this in a test class; but although the relevant field has a fully qualified class name (java.util.ArrayList), the "new ArrayList()" is copied over directly, and no import statement is added, so the test class doesn't compile.
The workaround is okay?I just tell my students they have to manually add the import statement when they do this (and the setUp code then works just fine). But it's kind of a drag and, hopefully, easy to fix.
Issue metadata
- Issue type: Bug
- Priority: Low