public void mark_performance_happy_path() { var record = new PerfRecord("foo", "bar", 0, 100); record.MarkEnd(50); theResult.MarkPerformance(record); theResult.duration.ShouldBe(50); theResult.exceeded.ShouldBeFalse(); }
public void mark_performance_sad_path() { var record = new PerfRecord("foo", "bar", 0, 100); record.MarkEnd(150); theResult.MarkPerformance(record); theResult.duration.ShouldBe(150); theResult.threshold.ShouldBe(100); theResult.exceeded.ShouldBeTrue(); }
public void mark_performance_happy_path() { var record = new PerfRecord("something", "something", 0, 100); record.MarkEnd(50); var result = new StepResult("foo", ResultStatus.ok); result.MarkPerformance(record); result.duration.ShouldBe(record.Duration); result.status.ShouldBe(ResultStatus.ok); }
public void mark_performance_threshold_record() { var record = new PerfRecord("something", "something", 0, 100); record.MarkEnd(200); var result = new StepResult("foo", ResultStatus.ok); result.MarkPerformance(record); result.status.ShouldBe(ResultStatus.error); result.error.ShouldBe("**Performance threshold violation**: actual 200 > max 100"); result.errorDisplay = ErrorDisplay.markdown; }
public void perf_record_threshold() { var record1 = new PerfRecord("grammar", "key1", 100, 0); record1.MarkEnd(200); record1.PerfViolation.ShouldBeFalse(); var record2 = new PerfRecord("grammar", "key1", 100, 300); record2.MarkEnd(200); record2.PerfViolation.ShouldBeFalse(); var record3 = new PerfRecord("grammar", "key1", 100, 300); record3.MarkEnd(500); record3.PerfViolation.ShouldBeTrue(); }