46 references to Collection
Microsoft.Extensions.VectorData.ConformanceTests (46)
ModelTests\BasicModelTests.cs (46)
21
var received = await
Collection
.GetAsync(expectedRecord.Key, new() { IncludeVectors = includeVectors });
33
var received = await
Collection
.GetAsync(ids, new() { IncludeVectors = includeVectors }).ToArrayAsync();
53
ArgumentNullException ex = await Assert.ThrowsAsync<ArgumentNullException>(() =>
Collection
.GetAsync((TKey)default!));
60
ArgumentNullException ex = await Assert.ThrowsAsync<ArgumentNullException>(() =>
Collection
.GetAsync(keys: null!).ToArrayAsync().AsTask());
69
Assert.Null(await
Collection
.GetAsync(key));
79
var received = await
Collection
.GetAsync(ids).ToListAsync();
95
Assert.Empty(await
Collection
.GetAsync([]).ToArrayAsync());
104
var results = await
Collection
.GetAsync(
119
var count = await
Collection
.GetAsync(r => true, top: 100).CountAsync();
133
var results = await
Collection
.GetAsync(
142
results = await
Collection
.GetAsync(
169
var results = await
Collection
.GetAsync(
178
results = await
Collection
.GetAsync(
191
var results = await
Collection
.GetAsync(
219
Assert.Null(await
Collection
.GetAsync(expectedKey));
220
await
Collection
.UpsertAsync(inserted);
222
var received = await
Collection
.GetAsync(expectedKey, new() { IncludeVectors = true });
225
await fixture.TestStore.WaitForDataAsync(
Collection
, recordCount: fixture.TestData.Count + 1);
240
Assert.NotNull(await
Collection
.GetAsync(existingRecord.Key));
241
await
Collection
.UpsertAsync(updated);
243
var received = await
Collection
.GetAsync(existingRecord.Key, new() { IncludeVectors = true });
269
Assert.Empty(await
Collection
.GetAsync(keys).ToArrayAsync());
271
await
Collection
.UpsertAsync(newRecords);
273
var received = await
Collection
.GetAsync(keys, new() { IncludeVectors = true }).ToArrayAsync();
302
await
Collection
.UpsertAsync(existingRecords);
305
var received = await
Collection
.GetAsync(keys, new() { IncludeVectors = true }).ToArrayAsync();
334
await
Collection
.UpsertAsync(records);
337
var received = await
Collection
.GetAsync(keys, new() { IncludeVectors = true }).ToArrayAsync();
348
ArgumentNullException ex = await Assert.ThrowsAsync<ArgumentNullException>(() =>
Collection
.UpsertAsync(records: null!));
357
var beforeCount = await
Collection
.GetAsync(r => true, top: 100).CountAsync();
358
await
Collection
.UpsertAsync([]);
359
var afterCount = await
Collection
.GetAsync(r => true, top: 100).CountAsync();
373
await
Collection
.DeleteAsync(keyToRemove);
374
Assert.Null(await
Collection
.GetAsync(keyToRemove));
382
await
Collection
.DeleteAsync(keysToRemove);
383
Assert.Empty(await
Collection
.GetAsync(keysToRemove).ToArrayAsync());
389
var beforeCount = await
Collection
.GetAsync(r => true, top: 100).CountAsync();
390
await
Collection
.DeleteAsync(fixture.GenerateNextKey<TKey>());
391
var afterCount = await
Collection
.GetAsync(r => true, top: 100).CountAsync();
399
var beforeCount = await
Collection
.GetAsync(r => true, top: 100).CountAsync();
400
await
Collection
.DeleteAsync([]);
401
var afterCount = await
Collection
.GetAsync(r => true, top: 100).CountAsync();
409
ArgumentNullException ex = await Assert.ThrowsAsync<ArgumentNullException>(() =>
Collection
.DeleteAsync(keys: null!));
423
var result = await
Collection
436
var result = await
Collection
449
var result = await
Collection