Telerik JustMock
[TestMethod]
public
void
ShouldArrangeAndAssertInASequence()
{
// Arrange
var foo = Mock.Create<IFoo>();
Mock.Arrange(() => foo.GetIntValue()).Returns(0).InSequence();
Mock.Arrange(() => foo.GetIntValue()).Returns(1).InSequence();
Mock.Arrange(() => foo.GetIntValue()).Returns(2).InSequence();
// Act
int
actualFirstCall = foo.GetIntValue();
int
actualSecondCall = foo.GetIntValue();
int
actualThirdCall = foo.GetIntValue();
// Assert
Assert.AreEqual(0, actualFirstCall);
Assert.AreEqual(1, actualSecondCall);
Assert.AreEqual(2, actualThirdCall);
}