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