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);
192
var savedPath = await client.
DownloadToAsync
("file-id-fallback", tempDir);
220
savedPath = await client.
DownloadToAsync
("file-cwd", string.Empty);
249
await Assert.ThrowsAsync<IOException>(() => client.
DownloadToAsync
("file-dup", tempFile));
261
await Assert.ThrowsAsync<ArgumentNullException>("client", () => client.
DownloadToAsync
("file-1", "path"));
268
await Assert.ThrowsAsync<ArgumentNullException>("fileId", () => client.
DownloadToAsync
(null!, "path"));
275
await Assert.ThrowsAsync<ArgumentNullException>("destinationPath", () => client.
DownloadToAsync
("file-1", null!));
282
await Assert.ThrowsAsync<ArgumentException>("fileId", () => client.
DownloadToAsync
(string.Empty, "path"));
289
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));