public void Compress() { _api.Upload(new FileInfo(_localTestImage), _synoTestFolderNoSlash + "/test_compress"); var start = _api.CompressAsync(_synoTestFolderNoSlash + "/test_compress", _synoTestFolderNoSlash + "/test_compress.zip"); start.success.Should().BeTrue(); start.Data.taskid.Should().NotBeNullOrEmpty(); for (var i = 0; i < 10; i++) { var status = _api.CompressStatus(start.Data.taskid); status.success.Should().BeTrue(); if (status.Data.finished) { break; } Thread.Sleep(2000); } BaseSynologyResponse stop = _api.CompressStop(start.Data.taskid); stop.success.Should().BeTrue(); }