Ah, I see now! Thank you so much.
I understand that using the AAA syntax is considered superior... I've
done it for 99.9% of my tests. I just wasn't aware that there was an
AAA (more or less) way to do ordered mocks.
Thanks again for your assistance.
-- Jason
On Sep 13, 2:52 pm, Tim Barcz <
timba...@gmail.com> wrote:
> Also, please note that my example is not ordered. To make my example worked
> for ordered semantic see the following (note the moving of the expectation
> setting - which would also work for the previous example) and the line *
> mockOrderedThing.GetMockRepository().Ordered()* which changes the underlying
> recorder from unordered to ordered:
>
> [TestMethod]
> public void TestThingsAreRunInOrderAAA()
> {
> // Arrange
> IOrderedThing mockOrderedThing =
> MockRepository.GenerateMock<IOrderedThing>();
> MyTestClass classUnderTest = new MyTestClass(mockOrderedThing);
> mockOrderedThing.GetMockRepository().Ordered();
>
> mockOrderedThing.Expect(thing => thing.FirstThing());
> mockOrderedThing.Expect(thing => thing.SecondThing());
>
> // Act
> classUnderTest.DoThingsInOrder();
>
> mockOrderedThing.VerifyAllExpectations();
>
>
>
>
>
> }
> On Mon, Sep 13, 2010 at 1:46 PM, Tim Barcz <
timba...@gmail.com> wrote:
> > By the way...let me know if this explains it or if you (or anyone) need
> > anymore assistance, I'd be glad to help.
>
> >>>
rhinomocks+...@googlegroups.com<rhinomocks%2Bunsubscribe@googlegrou
ps.com>
> >>> .
> Microsoft ASPInsiderhttp://timbarcz.devlicio.ushttp://
www.twitter.com/timbarcz- Hide quoted text -
>
> - Show quoted text -