MissingMethodException with Task<> as return value of the method to stub

72 views
Skip to first unread message

chao tian

unread,
Dec 11, 2014, 9:35:03 PM12/11/14
to rhino...@googlegroups.com
Stub() throws MissingMethodException: Constructor on type 'Task`1Proxy4954f20fb2d640d5a07ecbd60e27a719' not found. This is a very basic scenario that should just work. Does anyone know why?

public interface ITest
{
      Task<int> GetValue();
}

ITest test = MockRepository.GenerateMock<ITest>();
test.Stub(x => x.GetValue());




haifisch

unread,
Dec 19, 2014, 3:46:06 AM12/19/14
to rhino...@googlegroups.com
Hi Chao,

unfortunately I wasn't able to reproduce your problem - it runs fine under 'my' code base - https://github.com/alaendle/rhino-mocks

Br,

Andreas
Reply all
Reply to author
Forward
0 new messages