示例#1
0
        public void reset_clears_exception_text_and_has_errors()
        {
            var errors = new StepResults();

            errors.MarkMissingValue("a");
            errors.Clear();

            errors.HasErrors().ShouldBeFalse();
            errors.ExceptionText.ShouldBeEmpty();

            errors.CaptureException(new NotImplementedException().ToString());

            errors.Clear();

            errors.HasErrors().ShouldBeFalse();
            errors.ExceptionText.ShouldBeEmpty();
        }
示例#2
0
        public void reset_clears_failure_keys()
        {
            var errors = new StepResults();

            errors.MarkFailure("key1");

            errors.Clear();

            errors.IsInException("key1").ShouldBeFalse();
        }
示例#3
0
        public void clear_will_clear_out_the_frame_errors()
        {
            var errors = new StepResults();
            errors.MoveFrame();
            errors.MoveFrame();
            errors.CaptureException("anything");

            errors.Clear();

            errors.MoveFirst();
            errors.MoveFrame();
            errors.MoveFrame();
            errors.HasErrors().ShouldBeFalse();
        }
示例#4
0
        public void clear_will_clear_out_the_frame_errors()
        {
            var errors = new StepResults();

            errors.MoveFrame();
            errors.MoveFrame();
            errors.CaptureException("anything");

            errors.Clear();

            errors.MoveFirst();
            errors.MoveFrame();
            errors.MoveFrame();
            errors.HasErrors().ShouldBeFalse();
        }
示例#5
0
        public void reset_clears_failure_keys()
        {
            var errors = new StepResults();
            errors.MarkFailure("key1");

            errors.Clear();

            errors.IsInException("key1").ShouldBeFalse();
        }
示例#6
0
        public void reset_clears_exception_text_and_has_errors()
        {
            var errors = new StepResults();
            errors.MarkMissingValue("a");
            errors.Clear();

            errors.HasErrors().ShouldBeFalse();
            errors.ExceptionText.ShouldBeEmpty();

            errors.CaptureException(new NotImplementedException().ToString());

            errors.Clear();

            errors.HasErrors().ShouldBeFalse();
            errors.ExceptionText.ShouldBeEmpty();
        }