【文件属性】:
文件名称:system-out-test
文件大小:75KB
文件格式:ZIP
更新时间:2021-06-14 19:33:18
Java
系统测试
使用方法参数进行测试
public static void main( String . .. args) {
for ( String arg : args) {
System . out . println( " > " + arg + " < " );
}
}
@Test
public void test_with_method_arguments() {
Foo . main( " hello " , " world " );
assertOutput( " >hello< " , " >world< " );
}
用 System.in 测试
public static void main( String [] args) {
Scanner scanner = new Scanner ( System . in);
while
【文件预览】:
system-out-test-master
----gradlew.bat(2KB)
----gradlew(5KB)
----gradle()
--------wrapper()
----src()
--------test()
--------main()
----README.md(618B)
----build.gradle(128B)