public void EnsuresNonNullArguments()
            {
                var client = new ObservableRepositoryHooksClient(Substitute.For<IGitHubClient>());

                var config = new Dictionary<string, string> { { "config", "" } };

                Assert.Throws<ArgumentNullException>(() => client.Create(null, "name", new NewRepositoryHook("name", config)));
                Assert.Throws<ArgumentNullException>(() => client.Create("owner", null, new NewRepositoryHook("name", config)));
                Assert.Throws<ArgumentNullException>(() => client.Create("owner", "name", null));

                Assert.Throws<ArgumentNullException>(() => client.Create(1, null));

                Assert.Throws<ArgumentException>(() => client.Create("", "name", new NewRepositoryHook("name", config)));
                Assert.Throws<ArgumentException>(() => client.Create("owner", "", new NewRepositoryHook("name", config)));
            }
            public void RequestsCorrectUrlWithRepositoryId()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableRepositoryHooksClient(gitHubClient);

                var hook = new NewRepositoryHook("name", new Dictionary<string, string> { { "config", "" } });

                client.Create(1, hook);

                gitHubClient.Received().Repository.Hooks.Create(1, hook);
            }