public void capture_error_on_the_second_frame() { var errors = new StepResults(); errors.MoveFrame(); errors.CaptureException("anything"); errors.MoveFirst(); errors.HasErrors().ShouldBeFalse(); errors.MoveFrame(); errors.HasErrors().ShouldBeTrue(); }
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(); }
public void collapse_is_idempotent() { var result = new StepResults(); result.MoveFrame(); result.MoveFrame(); result.MoveFrame(); result.CaptureException("bad"); result.Collapse(); result.Collapse(); result.Collapse(); result.ExceptionText.ShouldEqual("bad"); }
public void collapse_with_a_hierarchy() { var result = new StepResults(); result.MoveFrame(); result.MoveFrame(); result.MoveFrame(); result.CaptureException("bad"); result.MoveFrame(); result.MoveFrame(); result.CaptureException("worse"); result.Collapse(); result.HasErrors().ShouldBeTrue(); result.ExceptionText.ShouldContain("bad"); result.ExceptionText.ShouldContain("worse"); }
public void capture_exception_with_frame() { var errors = new StepResults(); errors.CaptureException("anything"); errors.MoveFrame(); errors.HasErrors().ShouldBeFalse(); errors.ExceptionText.ShouldBeEmpty(); }
void ITestStream.IncrementParagraphGrammar() { _paragraphResults.MoveFrame(); }