Exemple #1
0
        static private void InsertProject()
        {
            Random rnd        = new Random();
            var    researcher = new Researcher {
                Username = "******" + rnd.Next(1, 10000).ToString(), Password = "******"
            };

            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();
        }
Exemple #2
0
    static private void InsertProject()
    {
        Random rnd        = new Random();
        var    researcher = new Researcher {
            Username = "******" + rnd.Next(1, 10000).ToString(), Password = "******"
        };

        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);
    }
Exemple #3
0
        private static void InsertProject()
        {
            Random rnd = new Random();
            var researcher = new Researcher { Username = "******" + rnd.Next(1, 10000).ToString(), Password = "******" };

            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();
        }
Exemple #4
0
    private static void InsertProject()
    {
        Random rnd = new Random();
            var researcher = new Researcher { Username = "******" + rnd.Next(1, 10000).ToString(), Password = "******" };

            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);
    }