1

我正在尝试使用 EasyMock 来帮助测试我的 GWT 项目,但我在createStrictMock方法上遇到错误:

import com.BiddingSystem.client.Presenter.CreateTopicPresenter;
import com.google.gwt.event.shared.HandlerManager;
import org.easymock.*;
import junit.framework.TestCase;
import com.google.gwt.junit.GWTMockUtilities;

public class TestBiddingSystem extends TestCase
{
    private CreateTopicPresenter TopicPresenter;
    private BiddingSysAsync MockRPC;
    private HandlerManager EventBus;
    private CreateTopicPresenter.Display TopicDisplay

    protected void setUpd()
    {
        EventBus = new HandlerManager(null);
        TopicDisplay = createStrictMock.(createTopicPresenter.Display.class);
    }
}

我究竟做错了什么?

4

1 回答 1

3

createStrictMock找不到方法。将以下导入添加到类中:

import static org.easymock.EasyMock.*;
于 2011-03-09T20:09:23.013 回答