public Person MapPerson(Contact contact)
        {
            Person person = new Person();

            _xdbFacetRepository.GetPersonalInfo(contact, ref person);

            person.Id = contact.Identifiers.Identifier;

            return person;
        }
        public Contact CreateContact(Person person)
        {
            var contact = _contactRepository.CreateContact(ID.NewID);
            contact.Identifiers.Identifier = person.Email;

            _xdbFacetRepository.UpdatePersonalInfo(person, ref contact);

            SaveContact(contact);

            return contact;
        }
        public void Mapper_Correctly_Maps_Identifier()
        {
            var contact = CreateContactMock();

            var person = new Person();

            var xdbFacetRepository = new Mock<IXdbFacetRepository>();
            xdbFacetRepository.Setup(x => x.GetPersonalInfo(contact.Object, ref person));

            var mapper = new Mapper(xdbFacetRepository.Object);
            person = mapper.MapPerson(contact.Object);

            Assert.AreEqual(person.Id, "MyId");
        }
 public void UpdateContact(Contact contact, Person person)
 {
     _xdbFacetRepository.UpdatePersonalInfo(person, ref contact);
     SaveContact(contact);
 }