public void CallsIntoClient()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableUserKeysClient(gitHubClient);

                client.Delete(1);

                gitHubClient.User.GitSshKey.Received().Delete(1);
            }
            public void CallsIntoClient()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableUserKeysClient(gitHubClient);

                client.GetAll("auser");

                gitHubClient.User.GitSshKey.Received().GetAll("auser", Arg.Any<ApiOptions>());
            }
        public ObservableUsersClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.User;

            Followers = new ObservableFollowersClient(client);
            Email     = new ObservableUserEmailsClient(client);
            Keys      = new ObservableUserKeysClient(client);
        }
        public ObservableUsersClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.User;

            Followers = new ObservableFollowersClient(client);
            Email = new ObservableUserEmailsClient(client);
            Keys = new ObservableUserKeysClient(client);
        }
        public ObservableUsersClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.User;

            Followers = new ObservableFollowersClient(client);
            Email = new ObservableUserEmailsClient(client);
            GitSshKey = new ObservableUserKeysClient(client);
            GpgKey = new ObservableUserGpgKeysClient(client);
            Administration = new ObservableUserAdministrationClient(client);
        }
Exemplo n.º 6
0
        public ObservableUsersClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, nameof(client));

            _client = client.User;

            Followers      = new ObservableFollowersClient(client);
            Email          = new ObservableUserEmailsClient(client);
            GitSshKey      = new ObservableUserKeysClient(client);
            GpgKey         = new ObservableUserGpgKeysClient(client);
            Administration = new ObservableUserAdministrationClient(client);
        }
            public void CallsIntoClient()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableUserKeysClient(gitHubClient);

                client.Create(new NewPublicKey("title", "ABCDEFG"));

                gitHubClient.User.GitSshKey.Received().Create(
                    Arg.Is<NewPublicKey>(a =>
                        a.Title == "title" &&
                        a.Key == "ABCDEFG"));
            }
        public ObservableUsersClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.User;

            Followers = new ObservableFollowersClient(client);
            Email     = new ObservableUserEmailsClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
            Keys = new ObservableUserKeysClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
            GitSshKey      = new ObservableUserKeysClient(client);
            GpgKey         = new ObservableUserGpgKeysClient(client);
            Administration = new ObservableUserAdministrationClient(client);
        }
        public ObservableUsersClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.User;

            Followers = new ObservableFollowersClient(client);
            Email = new ObservableUserEmailsClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
            Keys = new ObservableUserKeysClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
            GitSshKey = new ObservableUserKeysClient(client);
            GpgKey = new ObservableUserGpgKeysClient(client);
            Administration = new ObservableUserAdministrationClient(client);
        }