PublishToGalleryRequest() private method

/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. ///
private PublishToGalleryRequest ( string url, string title, string topicId = null, bool bypassTerms = null, bool mature = null ) : HttpRequestMessage
url string
title string
topicId string
bypassTerms bool
mature bool
return System.Net.Http.HttpRequestMessage
        public void PublishToGalleryRequest_WithUrlNull_ThrowsArgumentNullException()
        {
            var requestBuilder = new GalleryRequestBuilder();

            var exception = Record.Exception(() => requestBuilder.PublishToGalleryRequest(null, "test"));
            Assert.NotNull(exception);
            Assert.IsType<ArgumentNullException>(exception);

            var argNullException = (ArgumentNullException) exception;
            Assert.Equal(argNullException.ParamName, "url");
        }
        public async Task PublishToGalleryRequest_WithTitleOnly_Equal()
        {
            var client = new ImgurClient("123", "1234");
            var requestBuilder = new GalleryRequestBuilder();

            var mockUrl = $"{client.EndpointUrl}gallery/XysioD";
            var request = requestBuilder.PublishToGalleryRequest(mockUrl, "Hello World!");

            Assert.NotNull(request);
            var expected = "title=Hello+World%21";

            Assert.Equal(expected, await request.Content.ReadAsStringAsync().ConfigureAwait(false));
            Assert.Equal("https://api.imgur.com/3/gallery/XysioD", request.RequestUri.ToString());
            Assert.Equal(HttpMethod.Post, request.Method);
        }