Skip to content

Commit

Permalink
- Normalize variables names
Browse files Browse the repository at this point in the history
  • Loading branch information
BorisDog committed Apr 11, 2024
1 parent b493918 commit 0ed4e3d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public async Task ItCanGetNearestMatchAsync(string indexName)
{
// Arrange
var actualIndexName = indexName ?? "default";
string expectedSearchStage = $"{{ \"$vectorSearch\" : {{ \"queryVector\" : [1.0], \"path\" : \"embedding\", \"limit\" : 1, \"numCandidates\" : 10, \"index\" : \"{actualIndexName}\" }} }}";
string expectedStage = $"{{ \"$vectorSearch\" : {{ \"queryVector\" : [1.0], \"path\" : \"embedding\", \"limit\" : 1, \"numCandidates\" : 10, \"index\" : \"{actualIndexName}\" }} }}";

using var memoryStore = new MongoDBMemoryStore(this._mongoClientMock.Object, DatabaseName, indexName);
var memoryRecord = CreateRecord("id");
Expand All @@ -194,7 +194,7 @@ public async Task ItCanGetNearestMatchAsync(string indexName)

// Assert
AssertMemoryRecordEqual(memoryRecord, match.Value.Item1);
this._mongoCollectionMock.Verify(a => a.AggregateAsync(It.Is<PipelineDefinition<MongoDBMemoryEntry, MongoDBMemoryEntry>>(p => VerifyPipeline(p, expectedSearchStage)), It.IsAny<AggregateOptions>(), default), Times.Once());
this._mongoCollectionMock.Verify(a => a.AggregateAsync(It.Is<PipelineDefinition<MongoDBMemoryEntry, MongoDBMemoryEntry>>(p => VerifyPipeline(p, expectedStage)), It.IsAny<AggregateOptions>(), default), Times.Once());
}

[Theory]
Expand Down

0 comments on commit 0ed4e3d

Please sign in to comment.