6 instantiations of Record
Microsoft.Extensions.VectorData.ConformanceTests (6)
TypeTests\KeyTypeTests.cs (6)
57var record = new Record<TKey> 64var nextRecord = new Record<TKey> 155var record = new Record<TKey> 162var recordWithDefaultValueKey1 = new Record<TKey> 169var recordWithDefaultValueKey2 = new Record<TKey> 176var recordWithDefaultValueKey3 = new Record<TKey>
27 references to Record
Microsoft.Extensions.VectorData.ConformanceTests (27)
TypeTests\KeyTypeTests.cs (27)
30fixture.TestStore.CreateCollection<Guid, Record<string>>( 57var record = new Record<TKey> 64var nextRecord = new Record<TKey> 78var result = await collection.GetAsync(key1); 88var firstRecord = Assert.Single(results, r => r.Key.Equals(key1)); 90var secondRecord = Assert.Single(results, r => r.Key.Equals(key2)); 107[nameof(Record<>.Key)] = key1, 108[nameof(Record<>.Int)] = 8, 109[nameof(Record<>.Vector)] = new ReadOnlyMemory<float>([1, 2, 3]) 113[nameof(Record<>.Key)] = key2, 114[nameof(Record<>.Int)] = 9, 115[nameof(Record<>.Vector)] = new ReadOnlyMemory<float>([3, 2, 1]) 127Assert.IsType<TKey>(dynamicResult[nameof(Record<>.Key)]); 128Assert.Equal(key1, (TKey)dynamicResult[nameof(Record<>.Key)]!); 129Assert.Equal(8, dynamicResult[nameof(Record<>.Int)]); 136var firstDynamicRecord = Assert.Single(dynamicResults, r => r[nameof(Record<>.Key)]!.Equals(key1)); 137Assert.IsType<TKey>(firstDynamicRecord[nameof(Record<>.Key)]); 138Assert.Equal(8, firstDynamicRecord[nameof(Record<>.Int)]); 139var secondDynamicRecord = Assert.Single(dynamicResults, r => r[nameof(Record<>.Key)]!.Equals(key2)); 140Assert.IsType<TKey>(secondDynamicRecord[nameof(Record<>.Key)]); 141Assert.Equal(9, secondDynamicRecord[nameof(Record<>.Int)]); 155var record = new Record<TKey> 162var recordWithDefaultValueKey1 = new Record<TKey> 169var recordWithDefaultValueKey2 = new Record<TKey> 176var recordWithDefaultValueKey3 = new Record<TKey> 223public virtual VectorStoreCollection<TKey, Record<TKey>> CreateCollection<TKey>(bool? withAutoGeneration) 225=> TestStore.CreateCollection<TKey, Record<TKey>>(CollectionName, CreateRecordDefinition<TKey>(withAutoGeneration));