Closed GoogleCodeExporter closed 9 years ago
Original comment by julien.g...@gmail.com
on 29 Nov 2008 at 7:11
Started. But it might wait for tomorrow.
Original comment by julien.g...@gmail.com
on 29 Nov 2008 at 7:17
I think we should catch some kind of missing expectation. We shouldn't let
people write:
mockLoader.static
It doesn't mean much. We should validate it at the beginning of the play
closure.
I am changing the test to something like:
def mockLoader = mock(Loader)
mockLoader.static.one()
mockLoader.static
def expected = "Missing static expectation for Loader"
def message = shouldFail(AssertionFailedError) {
play {}
}
assertEquals expected, message
Original comment by julien.g...@gmail.com
on 30 Nov 2008 at 10:15
The best solution is to throw an exception on the line of "mockLoader.static",
then
the user can easily locate it. But I know it is hard (maybe impossible) to
implement, so let's just validate at the beginning of the play closure.
And please also do that to the missing property expectations.
Original comment by JohnnyJianHY
on 30 Nov 2008 at 10:43
Yep I agree, ideally we would like to throw an exception on the correct line
and I
agree it seems impossible to implement.
Original comment by julien.g...@gmail.com
on 30 Nov 2008 at 10:47
Original comment by julien.g...@gmail.com
on 30 Nov 2008 at 12:07
Original issue reported on code.google.com by
JohnnyJianHY
on 29 Nov 2008 at 3:21