2011-02-15 67 views

回答

0

我已經在工具開發人員的幫助下解決了它。

JUnit is designed to calculate each test invocation in advance. If you do not limit the amount of generated test data, you will run into OutOfMemoryError .

You can alternatively use an @InvocationCount:

@Test 
@InvocationCount(100) 
public void testAdd(int param1, int param2) { 
    ... 
} 

or limit the amount of data in the Generator code, by return null in generate() .

解決方法已過帳here

0

看起來像你想投一個枚舉到別的東西。 沒有比我害怕的更多的幫助,因爲我不知道具體的工具,而是朝着那個方向看。