I have written certain code which doesn't exactly have a main method. But I want to know if the code has any issues. Basically I can do it using the JUnit test case in Eclipse (I am using linux). But I am in a situation where I have to test it in Windows which currently doesn't have Eclipse. So I'm left with the option of doing it in cmd (if that is possible). What is the JUnit test (Eclipse) equivalent in cmd?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Look at this page: http://junit.sourceforge.net/doc/faq/faq.htm#running_4
To run your JUnit tests, you'll need the following elemements in your CLASSPATH:
If attempting to run your tests results in a NoClassDefFoundError, then something is missing from your CLASSPATH.
Windows Example:
Invoke the runner:
java org.junit.runner.JUnitCore <test class name>