示例#1
0
        public void TestCreateNewContact()
        {
            Guid    id         = Guid.NewGuid();
            Contact newContact = new Contact(id, "Milivoj", "Milani", "+385989059120", new ContactAddress("Tonžino 7b", "Rijeka", "51000", "Croatia"));

            _contactOrganizerSqlRepository.CreateNewContact(newContact);
            Assert.AreEqual(id, _contactOrganizerSqlRepository.GetContactById(id).Id);
        }
示例#2
0
 /// <summary>
 /// Returns a contact by Id.
 /// </summary>
 /// <param name="id">Contact Id.</param>
 /// <returns>Contact with the Id requested.</returns>
 public Contact GetContactById(Guid id)
 {
     return(_contactOrganizerRepository.GetContactById(id));
 }