更新时间:2022-04-04 23:57:21
要测试您的类main方法,只需编写如下内容:
To test your class main method simply write something like:
@Test(expected = IllegalArgumentException.class) public void testMainWithBadCommandLine() { YourClass.main(new String[] { "NaN" }); }
在Eclipse中将命令行参数传递给JUnit
在Eclipse中将参数传递给C ++程序
在 jupyter/ipython notebook 中将命令行参数传递给 argv
在Eclipse(Pydev)中将命令行参数传递给Python脚本