public virtual void FinishTest(Test test) { write("Test {0} finished: {1}", test.Name, test.GetStatus()); writeDivider(); writeSpacer(); writeSpacer(); writeSpacer(); }
public void AddTest(Test test, string resultsFile) { _tbody.Add("tr", x => { x.AddClass(test.WasSuccessful() ? HtmlClasses.PASS : HtmlClasses.FAIL); x.Add("td").Text(test.GetPath().Locator); x.Add("td").Text(test.Lifecycle.ToString()); x.Add("td") .Add("a") .Text(test.GetStatus()) .Attr("href", resultsFile); }); }
public void get_status_for_a_successful_test() { var test = new Test("name") { LastResult = new TestResult() { ExecutionTime = 1.23, Counts = new Counts() { Rights = 1 } } }; test.GetStatus().ShouldEqual("Succeeded with {0} in 1.23 seconds".ToFormat(test.LastResult.Counts)); }
public void get_status_on_a_failed_test() { var test = new Test("name"); test.LastResult = new TestResult { ExecutionTime = 2.34, Counts = new Counts() }; test.LastResult.Counts.IncrementWrongs(); test.GetStatus().ShouldEqual("Failed with {0} in 2.34 seconds".ToFormat(test.LastResult.Counts)); }
void ITestObserver.FinishTest(Test test) { lock (_locker) { _lastStatus = new TestStatusMessage { Status = test.GetStatus(), TestPath = test.LocatorPath() }; _progression = null; } Publish(); }