本文整理汇总了C#中Project.AddBehavioralTest方法的典型用法代码示例。如果您正苦于以下问题:C# Project.AddBehavioralTest方法的具体用法?C# Project.AddBehavioralTest怎么用?C# Project.AddBehavioralTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Project
的用法示例。
在下文中一共展示了Project.AddBehavioralTest方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateDefaultFst
public static Project CreateDefaultFst(Researcher researcher, String name)
{
if (researcher == null)
{
Logger.logError("Invalid Researcher");
return null;
}
var project = new Project { Name = name };
var preTest = new BehavioralTest
{
Name = "preTest",
BehavioralTestType = BehavioralTestType.Fst,
};
project.AddBehavioralTest(preTest);
var test = new BehavioralTest
{
Name = "test",
BehavioralTestType = BehavioralTestType.Fst,
};
project.AddBehavioralTest(test);
Researcher.Current.AddProject(project);
var preTestSession = new Session
{
Name = "",
};
preTest.AddSession(preTestSession);
var preTestTrial = new Trial
{
Name = "",
Duration = 15 * 60,
};
preTestSession.AddTrial(preTestTrial);
var testSession = new Session
{
Name = "",
};
test.AddSession(testSession);
var testTrial2 = new Trial
{
Name = "",
Duration = 5 * 60,
};
testSession.AddTrial(testTrial2);
Researcher.Current.Save();
return project;
}
示例2: CreateDefaultObjectRecognition
public static Project CreateDefaultObjectRecognition(Researcher researcher, String name)
{
if (researcher == null)
{
Logger.logError("Invalid Researcher");
return null;
}
var project = new Project { Name = name };
var test = new BehavioralTest
{
Name = "Test1",
BehavioralTestType = BehavioralTestType.ObjectRecognition,
};
project.AddBehavioralTest(test);
Researcher.Current.AddProject(project);
var testSession = new Session
{
Name = "S1",
};
test.AddSession(testSession);
var testTrial = new Trial
{
Name = "T1",
Duration = 300,
};
testSession.AddTrial(testTrial);
testTrial = new Trial
{
Name = "T2",
Duration = 300,
};
testSession.AddTrial(testTrial);
testTrial = new Trial
{
Name = "T3",
Duration = 300,
};
testSession.AddTrial(testTrial);
testSession = new Session
{
Name = "S2",
};
test.AddSession(testSession);
testTrial = new Trial
{
Name = "T1",
Duration = 300,
};
testSession.AddTrial(testTrial);
testTrial = new Trial
{
Name = "T2",
Duration = 300,
};
testSession.AddTrial(testTrial);
testTrial = new Trial
{
Name = "T3",
Duration = 300,
};
testSession.AddTrial(testTrial);
Researcher.Current.Save();
return project;
}
示例3: InsertProject
private static void InsertProject()
{
Random rnd = new Random();
var researcher = new Researcher { Username = "john" + rnd.Next(1, 10000).ToString(), Password = "123" };
var project = new Project { Name = "my project" + rnd.Next(1, 10000).ToString() };
//var behavioralTestType = null;// NHibernateHelper.OpenSession().Get<BehavioralTestType>(1);
var behavioralTest = new BehavioralTest { Name = "first test", Project = project };
project.AddBehavioralTest(behavioralTest);
researcher.AddProject(project);
researcher.Save();
}
示例4: InsertProject
private static void InsertProject()
{
Random rnd = new Random();
var researcher = new Researcher { Username = "john" + rnd.Next(1, 10000).ToString(), Password = "123" };
var project = new Project { Name = "my project" + rnd.Next(1, 10000).ToString() };
var behavioralTestType = NHibernateHelper.OpenSession().Get<BehavioralTestType>(1);
var behavioralTest = new BehavioralTest { Name = "first test", Project = project, BehavioralTestType = behavioralTestType};
project.AddBehavioralTest(behavioralTest);
researcher.AddProject(project);
researcher.Save();
System.Console.WriteLine("inserted new researcher with project!");
FindResearcherById((int)researcher.Id);
}