- changed component to Core.Mocking
Invalid Cast when using Arg.IsAny with "set of"
Issue #324
resolved
Following code raises an EInvalidCast exception:
uses
Spring.Mocking;
type
TColor = (cRed, cGreen, cBlue);
TColors = set of TColor;
ITest = interface(IInvokable)
['{5987F1A0-7982-4439-9442-E42E355229AE}']
procedure Run(AValue: TColors);
end;
var
LMock: Mock<ITest>;
begin
LMock.Setup.Executes().When.Run(Arg.IsAny<TColors>);
LMock.Instance.Run([]);
LMock.Received.Run(Arg.IsAny<TColors>);
end.
Comments (4)
-
reporter -
reporter - changed status to resolved
fixed
#324→ <<cset 9d647847d0c7>>
-
reporter fixed
#324→ <<cset 65e544057b52>>
-
reporter Issue
#393was marked as a duplicate of this issue. - Log in to comment