public async Task EnsuresArgumentsNotNull()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableTreesClient(gitHubClient);

                Assert.Throws <ArgumentNullException>(() => client.Create(null, "name", new NewTree()));
                Assert.Throws <ArgumentException>(() => client.Create("", "name", new NewTree()));
                Assert.Throws <ArgumentNullException>(() => client.Create("owner", null, new NewTree()));
                Assert.Throws <ArgumentException>(() => client.Create("owner", "", new NewTree()));
                Assert.Throws <ArgumentNullException>(() => client.Create("owner", "name", null));
            }
            public void CreatesFromClientIssueIssue()
            {
                var newTree      = new NewTree();
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableTreesClient(gitHubClient);

                client.Create("fake", "repo", newTree);

                gitHubClient.GitDatabase.Tree.Received().Create("fake", "repo", newTree);
            }
            public void RequestsCorrectUrlWithRepositoryId()
            {
                var newTree      = new NewTree();
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableTreesClient(gitHubClient);

                client.Create(1, newTree);

                gitHubClient.Git.Tree.Received().Create(1, newTree);
            }