Din*_*esh 18 java unit-testing easymock java-ee
我正在使用EasyMock在测试用例中创建模拟类.
expect(entity.getType()).andReturn("string");
Run Code Online (Sandbox Code Playgroud)
Type属于String数据类型.在我的开发环境中它运行良好.但是,如果我转移到我的服务器并采取构建,它失败并出现以下错误:
java.lang.IllegalStateException: incompatible return value type
Run Code Online (Sandbox Code Playgroud)
我不知道为什么它在服务器中失败并在我的开发机器中执行.
开发EasyMock版本:2.5.2