0
你能告訴我,如果有辦法解決和啓用junit.framework.Assert命令內聯忽略它們?有沒有一種方法可以內聯斷言/啓用斷言?
代碼例子只是爲了說明我的意思:
junitOff(); // first method I need help with
assertTrue(false); //would normally cause an AssertionError
junitOn(); // second method I need help with
System.out.println("Broke through asserTrue without Error")
我知道這將有可能使用try/catch語句,但是這不是我要找的,因爲我不能在執行下去行後斷言...
評論此行? – assylias 2012-04-05 09:24:57
打開命令被稱爲'/ *'關閉一個'* /' - 奇怪的命名約定,但是哦.. – Voo 2012-04-05 09:33:22
對不起,我試圖改進代碼示例,包括當然的命名約定! – 2012-04-05 09:46:33