Can I use this library for Junit?
I put this library:
import org.apache.commons.io.FileUtils;but it sends an error
The import org.apache.commons.io cannot be resolvedwhat library is equivalent exist for Junit?
I think you are confusing somethings.
- You are using a programming language called Java.
- You are using a
testrunner library called JUnit, which is a Java Package called
org.apache.commons.io.FileUtilsis also Java Package.
So you are programming tests in Java, so you can use all Java packages. So there is not an equivalent for JUnit, as that doesnt make sense. Just use apache.commons package next to JUnit.
Now you are missing the Apache Commons package, which can be downloaded here: https://commons.apache.org/proper/commons-io/download_io.cgi
I am not a Java expert, but here is a suggestion how to start using it:
the easiest way is to download jar file for ...commons.io and place it in lib folder in your project (or somewhere else) and then add to your build path from project properties page using Add JARs... (or Add external JARs... when jar is placed outside your workspace)
Your question is not really a testing question, but a Java programming question: How can I use this Java Package.