As always, please report back your findings....

Tim

On Tue, Feb 10, 2009 at 2:42 PM, Tim Barcz <[email protected]> wrote:

> I believe this is failing because you're saying make sure the second
> parameter isn't equal to 0 but rather an array with "0" as the 1st element.
>
> I cannot test right now, but change the second call, to Is.Anything and get
> more precise after you confirm that works.  Remember you're not passing an
> int there but an object array.
>
> Tim
>
>
> On Tue, Feb 10, 2009 at 2:39 PM, gbrunton <[email protected]> wrote:
>
>>
>> I cannot get the following test/setup to pass.
>>
>> public interface Interface
>> {
>>  void AddNote(string note, params object[] parameters);
>> }
>>
>> public void MethodUnderTest(Interface interface)
>> {
>>  interface.AddNote("{0}", 0);
>> }
>>
>> [Test]
>> public void TestingMethodUnderTest()
>> {
>>  Interface interface = MockRepository.GenerateMock<Interface>();
>>
>>  this.CreateSUT().MethodUnderTest(interface);
>>
>>  interface.AssertWasCalled(x => x.AddNote(Arg<string>.Is.Anything,
>> Arg<object>.Is.Equal(0)));
>> }
>>
>> I keep getting the following failure message:
>> Rhino.Mocks.Exceptions.ExpectationViolationException: Interface.AddNote
>> (anything, equal to 0); Expected #1, Actual #0.
>>
>>
>> Any thoughts?
>>
>> Thanks Gary
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to