Hello!

Hello!

I got a small problem here.
After solving a compiler error issue by... removing the directives :D (yes, I know, no, I don't care), I have started using the Delphi Mocks library and I have hit a new problem.

This is my code:

procedure TAspectRatioTest.Setup;
begin
  FImageTools := TMock.Create;
  FImageTools.Setup.WillReturn( 500 ).When.Width;
  FImageTools.Setup.WillReturn( 500 ).When.Height;
  FAspectRatio := TImageAspectRatio.Create( FImageTools );
end;

But when I run my tests in DUnitX it says that I didn't create the mock.
I am 100% sure it's me being daft here so, please, show me the error of my ways.

Thanks!

Vincent Parrett Nick Hodges Stefan Glienke

Comments