Example #1
0
        public Frame Next()
        {
            if (_next == null)
            {
                _next = new Frame();
            }

            return _next;
        }
Example #2
0
        public void collapse_with_a_single_child_brings_in_the_exception_text_and_removes_the_child()
        {
            var frame = new Frame();
            frame.Next().AppendException("some bad exception");

            frame.Collapse();

            frame.HasErrors().ShouldBeTrue();
            frame.ExceptionText.ShouldEqual("some bad exception");
        }
Example #3
0
        public void Collapse()
        {
            if (_next != null)
            {
                _next.Collapse();

                if (_next.ExceptionText.IsNotEmpty())
                {
                    AppendException(_next.ExceptionText);
                }
            }

            _next = null;
        }
Example #4
0
 public void Clear()
 {
     _next = null;
     _exceptionText = String.Empty;
 }
Example #5
0
 public void collapse_with_no_child_does_nothing_and_does_not_blow_up()
 {
     var frame = new Frame();
     frame.Collapse();
 }