public void PostsToCorrectUrlWithRepositoryId()
            {
                var newReference = new NewReference("heads/develop", "sha");
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableReferencesClient(gitHubClient);

                client.Create(1, newReference);

                gitHubClient.Received().Git.Reference.Create(1, newReference);
            }
            public void EnsuresNonNullArguments()
            {
                var client = new ObservableReferencesClient(Substitute.For<IGitHubClient>());

                Assert.Throws<ArgumentNullException>(() => client.Create(null, "name", new NewReference("heads/develop", "sha")));
                Assert.Throws<ArgumentNullException>(() => client.Create("owner", null, new NewReference("heads/develop", "sha")));
                Assert.Throws<ArgumentNullException>(() => client.Create("owner", "name", null));

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

                Assert.Throws<ArgumentException>(() => client.Create("", "name", new NewReference("heads/develop", "sha")));
                Assert.Throws<ArgumentException>(() => client.Create("owner", "", new NewReference("heads/develop", "sha")));
            }