public async Task EnsuresNonNullArguments()
            {
                var client = new GistCommentsClient(Substitute.For<IApiConnection>());

                await Assert.ThrowsAsync<ArgumentNullException>(() => client.Create("24", null));
                await Assert.ThrowsAsync<ArgumentException>(() => client.Create("24", ""));
            }
            public async Task EnsuresNonNullArguments()
            {
                var client = new GistCommentsClient(Substitute.For <IApiConnection>());

                await Assert.ThrowsAsync <ArgumentNullException>(() => client.Create("24", null));

                await Assert.ThrowsAsync <ArgumentException>(() => client.Create("24", ""));
            }
            public async Task PostsToCorrectUrl()
            {
                var comment    = "This is a comment.";
                var connection = Substitute.For <IApiConnection>();
                var client     = new GistCommentsClient(connection);

                await client.Create("24", comment);

                connection.Received().Post <GistComment>(Arg.Is <Uri>(u => u.ToString() == "gists/24/comments"), Arg.Is <BodyWrapper>(x => x.Body == comment));
            }
            public async Task PostsToCorrectUrl()
            {
                var comment = "This is a comment.";
                var connection = Substitute.For<IApiConnection>();
                var client = new GistCommentsClient(connection);

                await client.Create("24", comment);

                connection.Received().Post<GistComment>(Arg.Is<Uri>(u => u.ToString() == "gists/24/comments"), Arg.Is<BodyWrapper>(x => x.Body == comment));
            }