public void AddContact() { Contact c = new Contact { Name = "Baki", LastName = "Gervalla", Phones = new List <Phone> { new Phone { Type = "Work", Number = "044287715" }, new Phone { Type = "Home", Number = "049494949" } } }; Assert.DoesNotThrow(() => service.Add(c).Save()); }
private void SaveUserInputIntoPhoneBook() { Console.Write("Enter name and number: "); string input = Console.ReadLine(); IList <string> splittedInput = input.Split(' '); Contact kumamon = new Contact(); kumamon.Name = splittedInput[0]; kumamon.Number = splittedInput[1]; _myPhoneBook.Add(kumamon); }
public void AddContact() { Contact c = new Contact { Name = "tes15", Number = "0695614904", SurName = "test5", Type = "Home" }; Assert.DoesNotThrow(() => book.Add(c)); }