public async Task Request_is_correct([Frozen] IHttpRestClient client, IHubSpotContactPropertyGroupClient sut, string groupName, ContactPropertyGroup @group)
        {
            var response = await sut.UpdateAsync(groupName, @group);

            Mock.Get(client)
            .Verify(p => p.SendAsync <ContactPropertyGroup, ContactPropertyGroup>(HttpMethod.Put, $" /properties/v1/contacts/groups/named/{groupName}", group, null));
        }
        async Task <ContactPropertyGroup> IHubSpotContactPropertyGroupClient.UpdateAsync(string groupName, ContactPropertyGroup group)
        {
            if (groupName == null)
            {
                throw new ArgumentNullException(nameof(groupName));
            }

            if (group == null)
            {
                throw new ArgumentNullException(nameof(group));
            }

            if (group.Name == null)
            {
                throw new ArgumentNullException(nameof(group.Name));
            }

            if (group.DisplayName == null)
            {
                throw new ArgumentNullException(nameof(group.DisplayName));
            }

            string path = $" /properties/v1/contacts/groups/named/{groupName}";

            return(await _client.SendAsync <ContactPropertyGroup, ContactPropertyGroup>(HttpMethod.Put, path, @group, null));
        }
        public async Task Request_is_correct([Frozen] IHttpRestClient client, IHubSpotContactPropertyGroupClient sut, ContactPropertyGroup @group)
        {
            var response = await sut.CreateAsync(group);

            Mock.Get(client)
            .Verify(p => p.SendAsync <ContactPropertyGroup, ContactPropertyGroup>(HttpMethod.Post, "/properties/v1/contacts/groups", group, null));
        }
        async Task <ContactPropertyGroup> IHubSpotContactPropertyGroupClient.CreateAsync(ContactPropertyGroup group)
        {
            if (group == null)
            {
                throw new ArgumentNullException(nameof(group));
            }

            if (group.Name == null)
            {
                throw new ArgumentNullException(nameof(group.Name));
            }

            if (group.DisplayName == null)
            {
                throw new ArgumentNullException(nameof(group.DisplayName));
            }

            return(await _client.SendAsync <ContactPropertyGroup, ContactPropertyGroup>(HttpMethod.Post, "/properties/v1/contacts/groups", @group, null));
        }