>
> I am trying to determine if the return from a stubbed method is used as the 
> parameter for another method.  The problem I have is that I have multiple 
> stubbed objects of the same type in the same scope tat could all potentially 
> be used as the parameter, so I do not see how to determine which object is 
> actually being used:
>>
>> var provider = MockRepository.GenerateStub<IProv>();
>> var a = MockRepository.GenerateStub<IObj>();
>> var b = MockRepository.GenerateStub<IObj>();
>> prov.Stub(x => x.Method1()).Return(a);
>> prov.Stub(x => x.Method2()).Return(b);
>> var consumer = MockRepository.GenerateMock<ICon>();
>> consumer.Expect(x => x.Method3(Arg<IObj>.Is.Equal(a));
>> var sut = new Sut(provider, consumer);
>> sut.DoWork();
>> consumer.VerifyAllExpectations();
>>
>> where Sut.DoWork()
>> {
>>   var a = provider.Method1();
>>   var b = provider.Method2();
>>   consumer.Method3(a);
>> }
>>
>> Given this, it does not confirm if a or b is passed into Method3 on the 
>> consumer...
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rhinomocks+unsubscr...@googlegroups.com.
To post to this group, send email to rhinomocks@googlegroups.com.
Visit this group at http://groups.google.com/group/rhinomocks.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to