public void Setup() { addressBook = new AddressBookService(); Contact contact = new Contact("Sam", "Sher", "Shivajinagr", "Pune", "Mah", "111 222", "91 2837373737", "*****@*****.**", "Friends"); Contact contact1 = new Contact("Maj", "Sin", "vile", "mumbai", "Mah", "111 222", "91 2837373737", "*****@*****.**", "Family"); Contact contact2 = new Contact("Sim", "Ran", "patiala", "patiala", "Punjab", "111 222", "91 2837373737", "*****@*****.**", "Profession"); Contact contact3 = new Contact("M", "K", "vanas", "Pune", "Mah", "111 222", "91 2837373737", "*****@*****.**", "Family"); addressBook.AddContact(contact); addressBook.AddContact(contact1); addressBook.AddContact(contact2); addressBook.AddContact(contact3); }
public void Setup() { addressBook = new AddressBookService(); Person contact = new Person("Sonal", "Karle", "Ghatkopar", "Mumbai", "Maharashtra", "400 075", "91 9702420754", "*****@*****.**", "Friends"); Person contact1 = new Person("Sona", "Karle", "Gokhalenagar", "Pune", "Maharashtra", "411 016", "91 8806184089", "*****@*****.**", "Family"); Person contact2 = new Person("Ajinkya", "Patil", "Gandhinagar", "Ahmdabad", "Gujrat", "512 222", "91 7854373737", "*****@*****.**", "Profession"); Person contact3 = new Person("Yogesh", "Kadam", "Nashik", "Nashik", "Maharashtra", "400 022", "91 8657373737", "*****@*****.**", "Family"); addressBook.AddContact(contact); addressBook.AddContact(contact1); addressBook.AddContact(contact2); addressBook.AddContact(contact3); }
public void GivenContact_WhenAdded_ShouldReturnRow() { Contact contact = new Contact("Bruce", "Wayne", "Shivajinagr", "Pune", "Mah", "111 222", "91 2837373737", "*****@*****.**", "Family"); DataRow result = addressBook.AddContact(contact); DataRow row = addressBook.AddressBook.NewRow(); row["FirstName"] = "Bruce"; row["LastName"] = "Wayne"; row["Address"] = "Shivajinagr"; row["City"] = "Pune"; row["State"] = "Mah"; row["Zip"] = "111 222"; row["PhoneNumber"] = "91 2837373737"; row["Email"] = "*****@*****.**"; Assert.AreEqual(row["Zip"], result["Zip"]); }
public void GivenContact_WhenAdded_ShouldReturnRow() { Person contact = new Person("Prachi", "Gore", "Shivajinagr", "Pune", "Maharashtra", "411 222", "91 8564123737", "*****@*****.**", "Family"); DataRow result = addressBook.AddContact(contact); DataRow row = addressBook.AddressBook.NewRow(); row["FirstName"] = "Prachi"; row["LastName"] = "Gore"; row["Address"] = "Shivajinagr"; row["City"] = "Pune"; row["State"] = "Maharashtra"; row["Zip"] = "411 222"; row["PhoneNumber"] = "91 8564123737"; row["Email"] = "*****@*****.**"; Assert.AreEqual(row["State"], result["State"]); }