public void deep_activity_logging()
        {
            var subject1 = MockRepository.GenerateMock<ISubject>();
            var subject2 = MockRepository.GenerateMock<ISubject>();

            var x1 = new Object();
            var x2 = new Object();
            var x3 = new Object();
            var x4 = new Object();

            var log = new StubbedChainExecutionLog();
            log.RequestTime = 1;
            log.Log(x1);

            log.StartSubject(subject1);
            log.RequestTime = 5;
            log.Log(x2);

            log.RequestTime = 10;
            log.StartSubject(subject2);
            log.Log(x3);

            log.RequestTime = 15;
            log.FinishSubject();
            log.Log(x4);

            var steps = log.Steps.OrderBy(x => x.RequestTime).ToArray();

            steps[0].Activity.Subject.ShouldBe(log);
            steps[1].Activity.Subject.ShouldBe(subject1);

            steps[2].Log.ShouldBe(x3);
            steps[2].Activity.Subject.ShouldBe(subject2);
            steps[3].Activity.Subject.ShouldBe(subject1);
        }
        public void logging_sets_the_request_time_and_activity_at_parent()
        {
            var log = new StubbedChainExecutionLog();
            log.RequestTime = 111;

            log.Log(new object());

            log.Steps.Single().RequestTime.ShouldBe(111);
            log.Steps.Single().Activity.ShouldBe(log.Activity);
        }
        public void logging_sets_the_request_time_and_activity_at_parent()
        {
            var log = new StubbedChainExecutionLog();

            log.RequestTime = 111;

            log.Log(new object());

            log.Steps.Single().RequestTime.ShouldBe(111);
            log.Steps.Single().Activity.ShouldBe(log.Activity);
        }
        public void deep_activity_logging()
        {
            var subject1 = MockRepository.GenerateMock <ISubject>();
            var subject2 = MockRepository.GenerateMock <ISubject>();

            var x1 = new Object();
            var x2 = new Object();
            var x3 = new Object();
            var x4 = new Object();

            var log = new StubbedChainExecutionLog();

            log.RequestTime = 1;
            log.Log(x1);

            log.StartSubject(subject1);
            log.RequestTime = 5;
            log.Log(x2);

            log.RequestTime = 10;
            log.StartSubject(subject2);
            log.Log(x3);

            log.RequestTime = 15;
            log.FinishSubject();
            log.Log(x4);

            var steps = log.Steps.OrderBy(x => x.RequestTime).ToArray();


            steps[0].Activity.Subject.ShouldBe(log);
            steps[1].Activity.Subject.ShouldBe(subject1);

            steps[2].Log.ShouldBe(x3);
            steps[2].Activity.Subject.ShouldBe(subject2);
            steps[3].Activity.Subject.ShouldBe(subject1);
        }