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

                client.GetRecursive("fake", "repo", "123456ABCD");

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

                client.GetRecursive(1, "123456ABCD");

                gitHubClient.Git.Tree.Received().GetRecursive(1, "123456ABCD");
            }
            public async Task EnsuresNonNullArguments()
            {
                var client = new ObservableTreesClient(Substitute.For <IGitHubClient>());

                Assert.Throws <ArgumentNullException>(() => client.GetRecursive(null, "name", "123456ABCD"));
                Assert.Throws <ArgumentNullException>(() => client.GetRecursive("owner", null, "123456ABCD"));
                Assert.Throws <ArgumentNullException>(() => client.GetRecursive("owner", "name", null));

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

                Assert.Throws <ArgumentException>(() => client.GetRecursive("", "name", "123456ABCD"));
                Assert.Throws <ArgumentException>(() => client.GetRecursive("owner", "", "123456ABCD"));
                Assert.Throws <ArgumentException>(() => client.GetRecursive("owner", "name", ""));

                Assert.Throws <ArgumentException>(() => client.GetRecursive(1, ""));
            }