Jmock - how to automate & mock out console user input?
问题 I have some functionality that I want to mock out being called from main (static: I've read about that too - jmock mocking a static method). i recently read that JMock doesn't support the mocking of static functions. Well, the associated code (that's giving me a problem) must be called from main, and must be in the class with main... Sample source Test code Right now, I want to ensure that my main has a test to make sure that the file exists before it proceeds. Problem is, I have my program