11 references to DownloadToAsync
Microsoft.Extensions.AI.Abstractions.Tests (10)
Files\HostedFileClientExtensionsTests.cs (10)
136var savedPath = await client.DownloadToAsync("file-dl", tempFile); 161var savedPath = await client.DownloadToAsync("file-dl2", tempDir); 186var savedPath = await client.DownloadToAsync("file-id-fallback", tempDir); 214savedPath = await client.DownloadToAsync("file-cwd", string.Empty); 243await Assert.ThrowsAsync<IOException>(() => client.DownloadToAsync("file-dup", tempFile)); 255await Assert.ThrowsAsync<ArgumentNullException>("client", () => client.DownloadToAsync("file-1", "path")); 262await Assert.ThrowsAsync<ArgumentNullException>("fileId", () => client.DownloadToAsync(null!, "path")); 269await Assert.ThrowsAsync<ArgumentNullException>("destinationPath", () => client.DownloadToAsync("file-1", null!)); 276await Assert.ThrowsAsync<ArgumentException>("fileId", () => client.DownloadToAsync(string.Empty, "path")); 283await Assert.ThrowsAsync<ArgumentException>("fileId", () => client.DownloadToAsync(" ", "path"));
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIHostedFileClientIntegrationTests.cs (1)
244string savedPath = await RetryAsync(() => _client.DownloadToAsync(uploadedFileId, tempDir));