public void sending_an_envelope_that_is_local_does_not_finish_a_locally_tracked_session()
        {
            var history = new EnvelopeHistory(env1.Id);

            env1.Destination.Scheme.ShouldBe(TransportConstants.Local);

            history.RecordLocally(new EnvelopeRecord(EventType.Sent, env1, 110, null));
            history.IsComplete().ShouldBeFalse();
        }
        public void sending_an_envelope_that_is_not_local_does_finish_a_locally_tracked_session()
        {
            var history = new EnvelopeHistory(env1.Id);

            env1.Destination = "tcp://localhost:4444".ToUri();


            history.RecordLocally(new EnvelopeRecord(EventType.Sent, env1, 110, null));
            history.IsComplete().ShouldBeTrue();
        }
        public void envelope_history_determining_when_complete_cross_app(EventType[] events, bool isComplete)
        {
            var time    = 100;
            var history = new EnvelopeHistory(env1.Id);

            foreach (var eventType in events)
            {
                history.RecordLocally(new EnvelopeRecord(eventType, env1, ++time, null));
            }

            history.IsComplete().ShouldBe(isComplete);
        }