Update() public method

Update the specified organization with data from OrganizationUpdate.
Thrown if the client is not authenticated.
public Update ( string organizationName, OrganizationUpdate updateRequest ) : IObservable
organizationName string The name of the organization to update.
updateRequest OrganizationUpdate
return IObservable
コード例 #1
0
            public void EnsuresNonNullArguments()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableOrganizationsClient(gitHubClient);

                Assert.Throws<ArgumentNullException>(() => client.Update(null, new OrganizationUpdate()));
                Assert.Throws<ArgumentNullException>(() => client.Update("org", null));

                Assert.Throws<ArgumentException>(() => client.Update("", new OrganizationUpdate()));
            }
コード例 #2
0
            public void RequestsTheCorrectUrl()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableOrganizationsClient(gitHubClient);

                var organizationUpdate = new OrganizationUpdate();
                client.Update("initrode", organizationUpdate);

                gitHubClient.Received().Organization.Update("initrode", organizationUpdate);
            }