Ejemplo n.º 1
0
 public ShouldSavePersonWithLinks(ISession session, PersonFactory personFactory, ISpecimenBuilder specimenBuilder)
 {
     var links = specimenBuilder.CreateMany<LinkField>(_count).ToList();
     var fake = specimenBuilder.Create<Person>();
     var person = personFactory.CreatePerson(fake.Name, fake.Email, fake.Bio, Location.Georgetown, null, links);
     session.SaveOrUpdate(person);
     _personId = person.Id;
 }
 public ShouldSavePersonWithCategories(ISession session, PersonFactory personFactory, ISpecimenBuilder specimenBuilder)
 {
     var categories = specimenBuilder.CreateMany<CategoryField>(_count).ToList();
     var fake = specimenBuilder.Create<Person>();
     var person = personFactory.CreatePerson(fake.Name, fake.Email, fake.Bio, Location.SanMarcos, categories);
     session.SaveOrUpdate(person);
     _personId = person.Id;
 }
 public ShouldSavePersonWithLinksRemoved(ISession session, PersonFactory personFactory, ISpecimenBuilder specimenBuilder, IContainer container)
 {
     _container = container;
     var links = specimenBuilder.CreateMany<LinkField>(_startCount).ToList();
     var fake = specimenBuilder.Create<Person>();
     var person = personFactory.CreatePerson(fake.Name, fake.Email, fake.Bio, Location.SanMarcos, null, links);
     session.SaveOrUpdate(person);
     _personId = person.Id;
 }
 public ShouldSavePersonWithNoExtras(ISession session, PersonFactory personFactory)
 {
     var person = personFactory.CreatePerson("first last", "*****@*****.**", "this is my bio", Location.Austin);
     session.SaveOrUpdate(person);
     _personId = person.Id;
 }
Ejemplo n.º 5
0
 public CreatePersonRequestHandler(ISession session, PersonFactory personFactory)
 {
     _session       = session;
     _personFactory = personFactory;
 }