First, thanks for publishing it!
I'm having problems suppressing calls to original's type methods, maybe it's a misunderstanding of how teddymocks works.
What I expected was: When I mock type T with
var mock = new TeddyMocks.Stub<MyType>(MyType);
I thought I could pass mock.object to any object which requires an instance of MyType. When this object calls any methods on MyType, they do nothing per default and I can "add" behaviour to the mock via
mock.stubs(...
What I see is that when the object calls a method from MyType (using mock.object) this leads to the call of the original method of MyType, somehow defeating the purpose of mocking. I'm sure I'm using it wrong or I overlooked something.
First, thanks for publishing it! I'm having problems suppressing calls to original's type methods, maybe it's a misunderstanding of how teddymocks works.
What I expected was: When I mock type T with
I thought I could pass mock.object to any object which requires an instance of MyType. When this object calls any methods on MyType, they do nothing per default and I can "add" behaviour to the mock via
What I see is that when the object calls a method from MyType (using mock.object) this leads to the call of the original method of MyType, somehow defeating the purpose of mocking. I'm sure I'm using it wrong or I overlooked something.
Thanks in advance