本文整理汇总了C#中System.Test.GetStatus方法的典型用法代码示例。如果您正苦于以下问题:C# Test.GetStatus方法的具体用法?C# Test.GetStatus怎么用?C# Test.GetStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Test
的用法示例。
在下文中一共展示了Test.GetStatus方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FinishTest
public virtual void FinishTest(Test test)
{
write("Test {0} finished: {1}", test.Name, test.GetStatus());
writeDivider();
writeSpacer();
writeSpacer();
writeSpacer();
}
示例2: AddTest
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);
});
}
示例3: get_status_for_a_successful_test
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));
}
示例4: get_status_on_a_failed_test
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));
}
示例5: lock
void ITestObserver.FinishTest(Test test)
{
lock (_locker)
{
_lastStatus = new TestStatusMessage
{
Status = test.GetStatus(),
TestPath = test.LocatorPath()
};
_progression = null;
}
Publish();
}