Should Play missing throw an exception

2 views
Skip to first unread message

Julien

unread,
Mar 29, 2009, 3:31:05 PM3/29/09
to gmock-dev
I realise that the following test is passing:

void test(){
def mock = mock()
mock.something()
}

I thought we had something around it in within the Junit TestCase.

It seems doable to have something at the end of the test when people
are not using junit with the AST @WithGMock.

Johnny

unread,
Mar 30, 2009, 2:04:54 AM3/30/09
to gmoc...@googlegroups.com
It may be difficult to inject some method to the end of the test with
@WithGMock, because it is hard to tell whether a method is a test in
some cases. For example (a testng test case):

class A {
def someMock
@BeforeMethod void testSetup() { // how to tell this is not a test?
someMock = mock()
...
}
@Test void something() { // how to tell this is a test? from the @Test
annotation? then it is hard to cover all cases
...
}
}

在 2009-03-29日的 12:31 -0700,Julien写道:
Reply all
Reply to author
Forward
0 new messages