public void WhenISearchTheSameWith(string searchcriteria) { switch (searchcriteria) { case "firstname": result = addressbook.GetContactByFirstName(contact.FristName); break; case "lastname": result = addressbook.GetContactByLastName(contact.LastName); break; case "phonenumber": result = addressbook.GetContactByPhoneNumber(contact.PhoneNumber); break; default: break; } }