public void Initialize()
        {
            var groupsResponse = contactsFactory.ListGroups().SetName("example group").Execute();
            if (groupsResponse.List.Count > 0)
                contactsFactory.DeleteGroup(groupsResponse.List[0].Id).Execute();

            group = contactsFactory.CreateGroup().SetName("example group").Execute();
        }
 public void Initialize()
 {
     var groups = contactsFactory.ListGroups().SetName("exampleGroup").Execute();
     if (groups.List.Count > 0)
     {
         group = groups.List[0];
     } else
     {
         group = contactsFactory.CreateGroup().SetName("exampleGroup").Execute();
     }
 }
        public void Initialize()
        {
            var groups = contactsFactory.ListGroups().SetName("GroupY").Execute();
            if (groups.List.Count > 0)
                contactsFactory.DeleteGroup(groups.List[0].Id).Execute();

            groups = contactsFactory.ListGroups().SetName("exampleGroup").Execute();
            if (groups.List.Count > 0)
                group = groups.List[0];
            else
                group = contactsFactory.CreateGroup().SetName("exampleGroup").Execute();
        }
        public void Initialize()
        {
            var contactsResponse = contactsFactory.ListContacts().SetPhoneNumber(validTestNumber).Execute();
            if (contactsResponse.List.Count > 0)
                contact = contactsResponse.List[0];
            else
                contact = contactsFactory.CreateContact().SetPhoneNumber(validTestNumber).Execute();

            var groupsResponse = contactsFactory.ListGroups().SetName("example group").Execute();
            if (groupsResponse.List.Count > 0)
                group = groupsResponse.List[0];
            else
                group = contactsFactory.CreateGroup().SetName("example group").Execute();

            contactsFactory.BindContactToGroup(contact.Id, group.Id).Execute();
        }