6 writes to Key
Microsoft.Extensions.VectorData.ConformanceTests (6)
TypeTests\KeyTypeTests.cs (6)
59Key = key1, 66Key = key2, 157Key = key1, 164Key = key2, 171Key = key2, 178Key = key2,
33 references to Key
Microsoft.Extensions.VectorData.ConformanceTests (33)
TypeTests\KeyTypeTests.cs (33)
80Assert.Equal(key1, result.Key); 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, 113[nameof(Record<>.Key)] = key2, 127Assert.IsType<TKey>(dynamicResult[nameof(Record<>.Key)]); 128Assert.Equal(key1, (TKey)dynamicResult[nameof(Record<>.Key)]!); 136var firstDynamicRecord = Assert.Single(dynamicResults, r => r[nameof(Record<>.Key)]!.Equals(key1)); 137Assert.IsType<TKey>(firstDynamicRecord[nameof(Record<>.Key)]); 139var secondDynamicRecord = Assert.Single(dynamicResults, r => r[nameof(Record<>.Key)]!.Equals(key2)); 140Assert.IsType<TKey>(secondDynamicRecord[nameof(Record<>.Key)]); 185Assert.NotEqual(recordWithDefaultValueKey1.Key, key2); 186var preUpdateGeneratedKey = recordWithDefaultValueKey1.Key; 196Assert.Equal(recordWithDefaultValueKey1.Key, preUpdateGeneratedKey); 198Assert.NotEqual(recordWithDefaultValueKey2.Key, key2); 199Assert.NotEqual(recordWithDefaultValueKey3.Key, key2); 200Assert.NotEqual(recordWithDefaultValueKey2.Key, recordWithDefaultValueKey1.Key!); 201Assert.NotEqual(recordWithDefaultValueKey3.Key, recordWithDefaultValueKey1.Key!); 202Assert.NotEqual(recordWithDefaultValueKey3.Key, recordWithDefaultValueKey2.Key!); 203Assert.Equal(record.Key, key1); 205var results = await collectionWithAutoGeneration.GetAsync([key1, recordWithDefaultValueKey1.Key, recordWithDefaultValueKey2.Key, recordWithDefaultValueKey3.Key]).ToListAsync(); 206Assert.Single(results, r => r.Key.Equals(recordWithDefaultValueKey1.Key)); 207Assert.Single(results, r => r.Key.Equals(recordWithDefaultValueKey2.Key)); 208Assert.Single(results, r => r.Key.Equals(recordWithDefaultValueKey3.Key)); 209Assert.Single(results, r => r.Key.Equals(key1));