コード例 #1
0
 public async Task PostAsync_NullData_ThrowsArgumentNullException()
 {
     var httpCommunication = new HttpCommunication();
     await Assert.ThrowsExceptionAsync <ArgumentNullException>(
         async() =>
         await httpCommunication.PostAsync("http://localhost", "", new Dictionary <string, string>(), null));
 }
コード例 #2
0
 public async Task PostAsync_InvalidBaseEndpoint_ThrowsArgumentException()
 {
     var httpCommunication = new HttpCommunication();
     await Assert.ThrowsExceptionAsync <ArgumentException>(
         async() =>
         await httpCommunication.PostAsync("invalid uri", "", new Dictionary <string, string>(), new byte[0]));
 }