本文整理匯總了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();
}