我使用Scala 2.11.x与Scalatest和EasyMock(也使用EasyMockSugar)有以下测试代码:
gunicorn.sh
但是,在运行时我得到以下异常:
COPY . /srv/
答案 0 :(得分:1)
您需要在模拟上调用replay
:
class MyTestSuite extends FunSuite with Matchers with EasyMockSugar {
test("First differential correctness") {
val grid: Grid = mock[Grid]
val steps = 4
expect(grid.steps).andReturn(steps)
replay(grid)
// use the grid mock ...
verify(grid)
}
}