thought something like: mock.AssertWasCalled(x => x.SomeMethod(Arg<ComplexObject>.Matches (y=>y.Code == "abc")));
would work ... but intellisense doesn't give me y.Code?? On Mar 23, 4:55 pm, Jax <[email protected]> wrote: > I have a method similar to: > public void SomeMethod(ComplexObject obj) > .. on the mock, which is called from the tested code like: > classInstance.SomeMethod(new ComplexObject { Id = 1, Code = "abc" }); > > ... but now I want to test that classInstance was called with Id of 1 > and code of "abc", > but this does not work: > mock.AssertWasCalled(x => x.SomeMethod(Arg.Is(new ComplexObject { Id = > 1, Code = "abc" }))); > > I suspect it's because of the "new ComplexObject" part. > How do I go about testing that the method was called with ANY > ComplexObject with specific properties? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Rhino.Mocks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/RhinoMocks?hl=en -~----------~----~----~----~------~----~------~--~---
