/// <summary>
        /// Checks that the asserted call happened in order relative to others in the assertion chain.
        /// </summary>
        /// <param name="nextAssertion">An assertion describing the next call that should occur.</param>
        /// <returns>An object that can be used to assert that a following call was made in the expected order.</returns>
        /// <exception cref="ExpectationException">The call was not made in the expected order.</exception>
        public IOrderableCallAssertion Then(UnorderedCallAssertion nextAssertion)
        {
            var context = ServiceLocator.Current.Resolve <SequentialCallContext>();

            this.CheckCallHappenedInOrder(context);
            return(new OrderedCallAssertion(context).Then(nextAssertion));
        }
            public IOrderableCallAssertion Then(UnorderedCallAssertion nextAssertion)
            {
                Guard.AgainstNull(nextAssertion, nameof(nextAssertion));

                nextAssertion.CheckCallHappenedInOrder(this.context);
                return this;
            }
        /// <summary>
        /// Checks that the asserted call happened in order relative to others in the assertion chain.
        /// </summary>
        /// <param name="nextAssertion">An assertion describing the next call that should occur.</param>
        /// <returns>An object that can be used to assert that a following call was made in the expected order.</returns>
        /// <exception cref="ExpectationException">The call was not made in the expected order.</exception>
        public IOrderableCallAssertion Then(UnorderedCallAssertion nextAssertion)
        {
            Guard.AgainstNull(nextAssertion, nameof(nextAssertion));

            var context = ServiceLocator.Resolve<SequentialCallContext.Factory>().Invoke();
            this.CheckCallHappenedInOrder(context);
            return new OrderedCallAssertion(context).Then(nextAssertion);
        }
 public IOrderableCallAssertion Then(UnorderedCallAssertion nextAssertion)
 {
     Guard.AgainstNull(nextAssertion, nameof(nextAssertion));
     nextAssertion.CheckCallHappenedInOrder(this.context);
     return this;
 }
 /// <summary>
 /// Checks that the asserted call happened in order relative to others in the assertion chain.
 /// </summary>
 /// <param name="nextAssertion">An assertion describing the next call that should occur.</param>
 /// <returns>An object that can be used to assert that a following call was made in the expected order.</returns>
 /// <exception cref="ExpectationException">The call was not made in the expected order.</exception>
 public IOrderableCallAssertion Then(UnorderedCallAssertion nextAssertion)
 {
     var context = ServiceLocator.Current.Resolve<SequentialCallContext>();
     this.CheckCallHappenedInOrder(context);
     return new OrderedCallAssertion(context).Then(nextAssertion);
 }