I'll write the test in the AM (I'm GMT) so +07:00 offset. Honestly, I can't see the value now but hope the test writing will show me your thinking. Currently I can only see mocking out an exception throw to see that the client throws the exception, which is testing only nSubstitute. However it's 22:35, I'm stacked up on stuff for tonight and I'd rather write the code tomorrow than argue ;-)


Thanks for the peer review so far <3

________________________________
From: Brendan Forster <notifications@github.com>
Sent: 20 January 2014 22:30
To: octokit/octokit.net
Cc: Andy Cross
Subject: Re: [octokit.net] Implement Repository Hooks (#313)


In Octokit.Tests/Clients/RepositoryHooksClientTest.cs:

> +                client.Hooks.Get("fake", "repo");
> +
> +                connection.Received().GetAll<RepositoryHook>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/hooks"));
> +            }
> +
> +            [Fact]
> +            public async Task EnsuresNonNullArguments()
> +            {
> +                var client = new RepositoriesClient(Substitute.For<IApiConnection>());
> +
> +                await AssertEx.Throws<ArgumentNullException>(async () => await client.Hooks.Get(null, "name"));
> +                await AssertEx.Throws<ArgumentNullException>(async () => await client.Hooks.Get("owner", null));
> +            }
> +        }
> +
> +        public class TheGetByIdMethod


It's not in this direct code path, instead handled however core api exceptions are

Fair, but still a good thing to check that this client is behaving consistently, right?

-
Reply to this email directly or view it on GitHub<https://github.com/octokit/octokit.net/pull/313/files#r9020872>.