예제 #1
0
 public void Init()
 {
     johnDoe = new Person { NickName = "JohnDoe", Password = "******" + DateTime.Now.Ticks.ToString(), PrimaryMail = "*****@*****.**", UserPhoto = null };
     repository = new ProjectRepository();
     stubProject = new Project { Name = "SuperDuper", Description = "Super-puper-giga-cool", License = "Beer license", SiteUrl = @"http://foo.site", Tags = "C Python HTML5 jQuery", TrackerUrl = @"http://tracker.foo.site" };
     johnDoe.Projects = new HashSet<Project>();
     johnDoe.Projects.Add(stubProject);
 }
예제 #2
0
 public void Init()
 {
     repository = new ContactsRepository();
     person = new Person();
     person.NickName = "testNick" + DateTime.Now.Ticks.ToString();
     person.Password = "******";
     person.PrimaryMail = "*****@*****.**";
     person.Projects = null;
     using (ISession session = ConfigureRepository.SessionFactory.OpenSession())
     {
         using (ITransaction transaction = session.BeginTransaction())
         {
             session.SaveOrUpdate(person);
             transaction.Commit();
         }
     }
 }
예제 #3
0
 public void SetUpTestUser()
 {
     testPerson = new Person { NickName = "John Doe" + DateTime.Now.Ticks.ToString(), Password = DateTime.Now.Ticks.ToString(), PrimaryMail = "*****@*****.**", Projects = null, UserPhoto = null };
 }