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