Add .Repeat.Once() when setting the value.

Iain


On 3 December 2013 20:48, Shaunavon Blackmore <[email protected]
> wrote:

> I have a method that is called twice.  However, each time I call this
> method I would like to change the value on a property.  Below gives a
> simple explanation of what I am trying to achieve.
>
> Actual C# method to test
> public void  SomeMethod(string val1, string val2)
> {
>      var results1 = MyInterface.GetObjectResults(val1);
>
>      foreach (record in results1)
>      {
>                 var results2 = MyInterface.GetObjectResults(val2);    //
> same method as above
>
>                 if (results2.MyProperty != record.MyProperty)
>                 {
>                           //  TODO:
>                 }
>      }
> }
>
>
> If I stub the MyInterface.GetObjectResults two times the results will be
> the same regardless of what values gets passed inside the method.  How can
> I stub this method differently so that both MyProperty value is not return
> to be the same?  Any help is greatly appreciated.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/rhinomocks.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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