本文整理汇总了C#中Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.SetTestOutputSubdirectory方法的典型用法代码示例。如果您正苦于以下问题:C# TestContext.SetTestOutputSubdirectory方法的具体用法?C# TestContext.SetTestOutputSubdirectory怎么用?C# TestContext.SetTestOutputSubdirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.VisualStudio.TestTools.UnitTesting.TestContext
的用法示例。
在下文中一共展示了TestContext.SetTestOutputSubdirectory方法的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();
}