本文整理匯總了C#中Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.TestOutputPath方法的典型用法代碼示例。如果您正苦於以下問題:C# TestContext.TestOutputPath方法的具體用法?C# TestContext.TestOutputPath怎麽用?C# TestContext.TestOutputPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Microsoft.VisualStudio.TestTools.UnitTesting.TestContext
的用法示例。
在下文中一共展示了TestContext.TestOutputPath方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ClassInitialize
public static void ClassInitialize (TestContext testContext)
{
testContext.SetTestOutputSubdirectory(testContext.FullyQualifiedTestClassName + "/" + testContext.TestName);
Directory.CreateDirectory(testContext.TestOutputPath());
string testModelFilepath = testContext.TestOutputPath("../testModel.idpDB");
var sessionFactory = SessionFactoryFactory.CreateSessionFactory(testModelFilepath, new SessionFactoryConfig { CreateSchema = true });
var session = sessionFactory.OpenSession();
CreateTestProteins(session, testProteinSequences);
CreateTestData(session, testPsmSummary);
AddSubsetPeakData(session);
var qonverterSettings1 = new QonverterSettings()
{
Analysis = session.UniqueResult<Analysis>(o => o.Software.Name == "Engine 1"),
QonverterMethod = Qonverter.QonverterMethod.StaticWeighted,
DecoyPrefix = "quiRKy",
RerankMatches = true,
ScoreInfoByName = new Dictionary<string, Qonverter.Settings.ScoreInfo>()
{
{"score1", new Qonverter.Settings.ScoreInfo()
{
Weight = 1,
Order = Qonverter.Settings.Order.Ascending,
NormalizationMethod = Qonverter.Settings.NormalizationMethod.Linear
}},
{"score2", new Qonverter.Settings.ScoreInfo()
{
Weight = 42,
Order = Qonverter.Settings.Order.Descending,
NormalizationMethod = Qonverter.Settings.NormalizationMethod.Quantile
}}
}
};
var qonverterSettings2 = new QonverterSettings()
{
Analysis = session.UniqueResult<Analysis>(o => o.Software.Name == "Engine 2"),
QonverterMethod = Qonverter.QonverterMethod.SVM,
DecoyPrefix = "___---",
RerankMatches = false,
ScoreInfoByName = new Dictionary<string, Qonverter.Settings.ScoreInfo>()
{
{"foo", new Qonverter.Settings.ScoreInfo()
{
Weight = 7,
Order = Qonverter.Settings.Order.Ascending,
NormalizationMethod = Qonverter.Settings.NormalizationMethod.Off
}},
{"bar", new Qonverter.Settings.ScoreInfo()
{
Weight = 11,
Order = Qonverter.Settings.Order.Descending,
NormalizationMethod = Qonverter.Settings.NormalizationMethod.Off
}}
}
};
session.Save(qonverterSettings1);
session.Save(qonverterSettings2);
session.Flush();
session.Close();
sessionFactory.Close();
}