I'm trying to test with Delphi Mocks framework a class that creates simple value objects and passes them to a collaborator. How to check contents of these objects?
General idea of the code is like this:
TData = class
  Code : string;
  Field1 : string;
  Field2 : string;
end;
IReceiver = interface
  procedure Process(aData : TData);
end;
TSUTClass = class
public
  procedure DoSomething(const aCode : string);
  property Receiver : IReceiver;
end;
So when a call to DoSomething is made, TSUTClass should make several instances of TData and pass them one by one to Receiver.Process. I can verify that correct count of calls is made with this setup:
Mock := TMock<IReceiver>;
Mock.Setup.Expect.Exactly('Process', ExpectedCount);
But how to check if values of Field1 and Field2 are correct?