Resetting/Invalidating User Input

Hello,

I am writing JUnit test cases and I was wondering if there was any way that I could provide the user inputs during each test case? Currently I am using the student.TestCase.setSystemIn(...) to set the inputs for all of the test cases at the beginning of the JUnit tests but I'd like to reset or invalidate the input stream at the beginning of each test case and set the inputs during the test cases itself.

Is there a way to do this? I've tried using resetSystemIO() but that doesn't seem to work. 

Any help would be greatly appreciated!

Thanks,

Varun

Groups: