It should be log.LogEntry(ref userName, ref userIp); LastCall .Constraints(Is.Same(userName), Is.Same (userIp)) .Return(true);
OR log.LogEntry( ref Arg<string>.Ref(Is.Same(userName), userName).Dummy, ref Arg<string>.Ref(Is.Same(userIp), userIp).Dummy) .Return(true); See also Rhino 3.5 documentation: http://ayende.com/wiki/Rhino+Mocks+3.5.ashx#ArgumentConstraints On 13 Aug., 21:15, Newton <[email protected]> wrote: > With some more digging, I found the answer: > > Created a Interface for the SecurityLog class. > > Changed the StrictMock to: > ISecurityLog log = mocks.StrictMock<ISecurityLog>(); > > Added LastCall with Constraints to the mocks.Record: > using (mocks.Record()) > { > log.LogEntry(ref userName, ref userIp); > LastCall.Constraints(new Same(userName), new Same > (userIp)).Return(true); > } > > Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
