2011-02-15 62 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

看起来像你想投一个枚举到别的东西。 没有比我害怕的更多的帮助,因为我不知道具体的工具,而是朝着那个方向看。