Example #1
0
 public static void HttpClientUrlTemplateExtensions_CreateRequestMessage_Generic_Args()
 {
     Assert.Throws <ArgumentNullException>(() => HttpClientUrlTemplateExtensions
                                           .CreateRequestMessage(null, HttpMethod.Delete, s_genericTemplate, default));
     Assert.Throws <ArgumentNullException>(() => HttpClientUrlTemplateExtensions
                                           .CreateRequestMessage(new HttpClient(), null, s_genericTemplate, default));
     Assert.Throws <ArgumentNullException>(() => HttpClientUrlTemplateExtensions
                                           .CreateRequestMessage(new HttpClient(), HttpMethod.Delete, default(UrlTemplate <Data>), default));
 }
Example #2
0
 public static void HttpClientUrlTemplateExtensions_CreateRequestMessage_Boxed_Args()
 {
     Assert.Throws <ArgumentNullException>(() => HttpClientUrlTemplateExtensions
                                           .CreateRequestMessage(null, HttpMethod.Delete, s_boxedTemplate, null));
     Assert.Throws <ArgumentNullException>(() => HttpClientUrlTemplateExtensions
                                           .CreateRequestMessage(new HttpClient(), null, s_boxedTemplate, null));
     Assert.Throws <ArgumentNullException>(() => HttpClientUrlTemplateExtensions
                                           .CreateRequestMessage(new HttpClient(), HttpMethod.Delete, default(UrlTemplate), null));
 }