Progress Telerik JustMock

Assert Call Order

Nasa, Visa, Microsoft Fox, Samsung, IBM World Bank Group, Volvo
  • Assert Call Order Overview

    When the execution order of methods  is of extreme importance, JustMock provides you the functionality to verify the required call order by simply using the InOrder expectation when writing an arrangement.

    [TestMethod]
    public void ShouldVerifyCallsOrder()
    {
        // Arrange
        var foo = Mock.Create<IFoo>();
      
        Mock.Arrange(() => foo.Submit()).InOrder();
        Mock.Arrange(() => foo.Echo(Arg.AnyInt)).InOrder();
      
        // Act
        foo.Submit();
        foo.Echo(5);
      
        // Assert
        Mock.Assert(foo);
    }

    Verifying Calls Order
Background-NextSteps

Next Steps

See Plans & Pricing

Purchase individual products or any of the bundles

Download Free Trial

With dedicated technical support.