AddCustomGalleryTagsRequest() 개인적인 메소드

/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. ///
private AddCustomGalleryTagsRequest ( string url, IEnumerable tags ) : HttpRequestMessage
url string
tags IEnumerable
리턴 System.Net.Http.HttpRequestMessage
        public void AddCustomGalleryTagsRequest_WithUrlNull_ThrowsArgumentNullException()
        {
            var requestBuilder = new CustomGalleryRequestBuilder();

            var exception = Record.Exception(() => requestBuilder.AddCustomGalleryTagsRequest(null, new List<string>()));
            Assert.NotNull(exception);
            Assert.IsType<ArgumentNullException>(exception);

            var argNullException = (ArgumentNullException) exception;
            Assert.Equal(argNullException.ParamName, "url");
        }
        public void AddCustomGalleryTagsRequest_WithTagsNull_ThrowsArgumentNullException()
        {
            var client = new ImgurClient("123", "1234");
            var requestBuilder = new CustomGalleryRequestBuilder();
            var mockUrl = $"{client.EndpointUrl}g/custom/add_tags";

            var exception = Record.Exception(() => requestBuilder.AddCustomGalleryTagsRequest(mockUrl, null));
            Assert.NotNull(exception);
            Assert.IsType<ArgumentNullException>(exception);

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

            var mockUrl = $"{client.EndpointUrl}g/custom/add_tags";
            var tags = new List<string> {"Cats", "Dogs", "Seals"};

            var request = requestBuilder.AddCustomGalleryTagsRequest(mockUrl, tags);
            var expected = "tags=Cats%2CDogs%2CSeals";

            Assert.NotNull(request);
            Assert.Equal(expected, await request.Content.ReadAsStringAsync().ConfigureAwait(false));
            Assert.Equal("https://api.imgur.com/3/g/custom/add_tags", request.RequestUri.ToString());
            Assert.Equal(HttpMethod.Put, request.Method);
        }