Using JUnit to test a main method that requires simulation of keyboard input with an input stream?

后端 未结 2 1353
北海茫月
北海茫月 2021-01-15 09:03

Let\'s suppose I have a program with a main method that uses the java.util.Scanner class to receive user input.

import java.util.Scanner;

publ         


        
2条回答
提交回复
热议问题