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