Hi Bill,
I'm sorry but I think I doesn't get your point. Is something wrong with the
behavior hanggoff and I expected? What exactly did you mean by "developing
against Record/Replay"?
Best regards,
Andreas
Am Freitag, 27. April 2012 12:39:16 UTC+2 schrieb bill richards:
>
> Just out of interest, but why are we developing against Record/Replay?
>
>
>
> On Tuesday, March 20, 2012 1:38:07 PM UTC, honggoff wrote:
>>
>> Hi,
>> while tracking down an error in a unit test, I came across some (IMO) odd
>> behavior of BackToRecordAll. I boiled it down to the following test case:
>>
>> public interface IDummy
>> {
>> bool GetValue();
>> }
>>
>> [Test]
>> public void TestBackTorecordAll()
>> {
>> MockRepository mock = new MockRepository();
>> IDummy test = mock.StrictMock<IDummy>();
>>
>> using (mock.Unordered())
>> {
>> Expect.Call(test.GetValue())
>> .Return(true)
>> .Repeat.AtLeastOnce();
>> }
>> mock.ReplayAll();
>>
>> Assert.IsTrue(test.GetValue());
>> mock.VerifyAll();
>>
>> mock.BackToRecordAll(BackToRecordOptions.All);
>> Expect.Call(test.GetValue())
>> .Return(false)
>> .Repeat.AtLeastOnce();
>>
>> mock.ReplayAll();
>> Assert.IsFalse(test.GetValue());
>>
>> mock.VerifyAll();
>> }
>>
>> This test case fails. Is this the expected behavior? If so, why does the
>> test succeed, if i remove the mock.Unordered() call?
>>
>> Maybe I'm misunderstanding what BackToRecordAll does. I expected it to go
>> back to record mode and reset all expectations.
>>
>
--
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rhinomocks/-/DWHG5y5vE3IJ.
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.