当前位置: 首页>>代码示例>>C#>>正文


C# Project.AddBehavioralTest方法代码示例

本文整理汇总了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;
        }
开发者ID:kinoscope,项目名称:kinoscope,代码行数:56,代码来源:SeedData.cs

示例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;
        }
开发者ID:kinoscope,项目名称:kinoscope,代码行数:78,代码来源:SeedData.cs

示例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();
        }
开发者ID:kinoscope,项目名称:kinoscope,代码行数:14,代码来源:SeedData.cs

示例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);
    }
开发者ID:kinoscope,项目名称:kinoscope,代码行数:17,代码来源:roof.cs


注:本文中的Project.AddBehavioralTest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。