Delphi Mock Wizard
Let me preface this by saying that I am fairly new to Unit Testing, Mocks, Stubs, Etc ...
I have installed Delphi-Mock-Wizard. When I select a block and "Generate Mock" a new block is created, but it is very simple and not something I understand Mocks.
unit Unit1;
(** WARNING - AUTO-GENERATING MOQ! Change this if you want, but be aware that any changes you make will be lost if you restore the object's layout (for instance, if the interface changes).
My advice is to create a descendant of your autogenerated layout class of another block - and override things there. This way you save them.
In addition, the autogenerator code is not yet smart enough to create stubs for legacy interfaces. In this case, change the mock declaration to inherit from the mock implementation that implements the missing interface. This,
unfortunately, is in violation of the directive above. I'm working on it.
You may also need to manually change the device name above. Another thing is
I work. **)
interface
uses
PascalMock,
TestInterfaces;
type
IThingy = interface;
implementation
end.
Looking at the source, it seems to be quite a bit commented. I'm wondering if anyone got this to work?
My IDE is D2010.
Thanks.
a source to share
Delphi Mock Wizard is incomplete. It almost doesn't work. The output you posted in your question looks like the only one that the tool is capable of generating. If you want to use it, you will have to wait until it is ripe. Since it was updated in October 2008, you might have to wait a long time.
You will need to choose a different direction for your bullying needs. Please see an earlier question on Stack Overflow:
a source to share