public async Task EnsureNonNullArguments()
            {
                var orgMembers = new OrganizationMembersClient(Substitute.For <IApiConnection>());

                await Assert.ThrowsAsync <ArgumentNullException>(() => orgMembers.Delete(null, "username"));

                await Assert.ThrowsAsync <ArgumentException>(() => orgMembers.Delete("", "username"));

                await Assert.ThrowsAsync <ArgumentNullException>(() => orgMembers.Delete("org", null));

                await Assert.ThrowsAsync <ArgumentException>(() => orgMembers.Delete("org", ""));
            }
            public void PostsToCorrectUrl()
            {
                var connection = Substitute.For <IApiConnection>();
                var client     = new OrganizationMembersClient(connection);

                client.Delete("org", "username");

                connection.Received().Delete(Arg.Is <Uri>(u => u.ToString() == "orgs/org/members/username"));
            }
            public async Task EnsureNonNullArguments()
            {
                var orgMembers = new OrganizationMembersClient(Substitute.For<IApiConnection>());

                await Assert.ThrowsAsync<ArgumentNullException>(() => orgMembers.Delete(null, "username"));
                await Assert.ThrowsAsync<ArgumentException>(() => orgMembers.Delete("", "username"));
                await Assert.ThrowsAsync<ArgumentNullException>(() => orgMembers.Delete("org", null));
                await Assert.ThrowsAsync<ArgumentException>(() => orgMembers.Delete("org", ""));
            }
            public void PostsToCorrectUrl()
            {
                var connection = Substitute.For<IApiConnection>();
                var client = new OrganizationMembersClient(connection);

                client.Delete("org", "username");

                connection.Received().Delete(Arg.Is<Uri>(u => u.ToString() == "orgs/org/members/username"));
            }