本文整理匯總了C#中System.Test.GetPath方法的典型用法代碼示例。如果您正苦於以下問題:C# Test.GetPath方法的具體用法?C# Test.GetPath怎麽用?C# Test.GetPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Test
的用法示例。
在下文中一共展示了Test.GetPath方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1:
public TestResult this[Test test]
{
get
{
return _results[test.GetPath().Locator];
}
set
{
_results[test.GetPath().Locator] = value;
}
}
示例2: SaveResult
public static void SaveResult(TestResult result, Test test, string folder)
{
result.Locator = test.GetPath().Locator;
var fileSystem = new FileSystem();
fileSystem.CreateDirectory(folder);
var filename = Path.Combine(folder, FileNameFor(test));
fileSystem.PersistToFile(result, filename);
}
示例3: 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);
});
}
示例4: GenerateMethod
public string GenerateMethod(Test test)
{
var methodText = _options.MethodTemplate;
if (methodText.IsEmpty())
{
methodText = DefaultMethodTemplate();
}
methodText = methodText.Replace(TEST_PATH, test.GetPath().Locator);
var sanitizedName = test.Name.Replace(" ", "_");
return methodText.Replace(CLEAN_TEST_NAME, sanitizedName);
}
示例5: FileNameFor
public static string FileNameFor(Test test)
{
string locator = test.GetPath().Locator;
return FileNameFor(locator);
}
示例6: get_path_with_parent
public void get_path_with_parent()
{
var suite = new Suite("s1");
var test = new Test("t1");
suite.AddTest(test);
test.GetPath().Locator.ShouldEqual("s1/t1");
}
示例7: get_path_without_a_parent
public void get_path_without_a_parent()
{
var test = new Test("t1");
test.GetPath().Locator.ShouldEqual("t1");
}