Ejemplo n.º 1
0
 public async Task GetAsyncFailureTest()
 {
     await AssertHelpers.ThrowsAsync <ClientException>(() => _apiClient.GetAsync <IDictionary <string, ApiInfo> >(@"query.cgi", new Dictionary <string, object>()
     {
         { "api", "SYNO.API.Info" },
         { "version", "2" }
     }));
 }
Ejemplo n.º 2
0
 public async Task SetServerConfigThrowsOnNullConfigTest()
 {
     await AssertHelpers.ThrowsAsync <ArgumentNullException>(() => _service.SetServerConfig(null));
 }
Ejemplo n.º 3
0
 public async Task SetServerConfigThrowsOnEmptyConfigTest()
 {
     await AssertHelpers.ThrowsAsync <ArgumentException>(() => _service.SetServerConfig(new Config()));
 }
Ejemplo n.º 4
0
 public async Task EditTaskThrowsOnNullOrWhitespaceTest(string destination)
 {
     await AssertHelpers.ThrowsAsync <ArgumentException>(() => _service.EditTask(Enumerable.Empty <string>(), destination));
 }
Ejemplo n.º 5
0
 public async Task EditTaskThrowsOnEmptyIdsTest()
 {
     await AssertHelpers.ThrowsAsync <ArgumentException>(() => _service.EditTask(Enumerable.Empty <string>(), "destination"));
 }
Ejemplo n.º 6
0
 public async Task EditTaskThrowsOnNullIdsTest()
 {
     await AssertHelpers.ThrowsAsync <ArgumentNullException>(() => _service.EditTask(null, "destination"));
 }
Ejemplo n.º 7
0
 public async Task ResumeTaskThrowsOnEmptyIdsTest()
 {
     await AssertHelpers.ThrowsAsync <ArgumentException>(() => _service.ResumeTask(Enumerable.Empty <string>()));
 }
Ejemplo n.º 8
0
 public async Task ResumeTaskThrowsOnNullIdsTest()
 {
     await AssertHelpers.ThrowsAsync <ArgumentNullException>(() => _service.ResumeTask(null));
 }
Ejemplo n.º 9
0
 public async Task DeleteTaskThrowsOnNullIdsTest()
 {
     await AssertHelpers.ThrowsAsync <ArgumentNullException>(() => _service.DeleteTask(null, false));
 }
Ejemplo n.º 10
0
 public async Task CreateTaskThrowsOnNullUrisTest()
 {
     await AssertHelpers.ThrowsAsync <ArgumentNullException>(() => _service.CreateTask(null));
 }
Ejemplo n.º 11
0
 public async Task GetInfoThrowsOnNullIdsTest()
 {
     await AssertHelpers.ThrowsAsync <ArgumentNullException>(() => _service.GetInfo(null));
 }