Groups
Groups
Sign in
Groups
Groups
gmock-user
Conversations
About
Send feedback
Help
Partial Mocking Problem
17 views
Skip to first unread message
Jozef Dransfield
unread,
Sep 15, 2009, 5:57:27 PM
9/15/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gmock-user
if i have this test:
public class MehTest extends GMockTestCase {
def meh
void setUp() {
meh = new Meh()
}
void testDoSomething() {
ordered {
mock(meh).doSomethingElse()
}
play {
meh.doSomething()
}
}
The test passes when the code looks like this:
public class Meh {
void doSomething() {
doSomethingElse()
}
void doSomethingElse() {
throw new RuntimeException("Ruh oh")
}
But as soon as i move the doSomethingElse() call into a closure the
test throws a RuntimeException
public class Meh {
void doSomething() {
["a list"].each {
doSomethingElse()
}
}
void doSomethingElse() {
throw new RuntimeException("Ruh oh")
}
Johnny Jian
unread,
Sep 16, 2009, 5:57:01 AM
9/16/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gmock...@googlegroups.com
Fixed on the trunk. Issue:
http://code.google.com/p/gmock/issues/detail?id=92
Reply all
Reply to author
Forward
0 new messages