added some missing cancellation tokens and fixed incorrect tests

This commit is contained in:
Sean Garrett
2023-06-16 22:40:46 +01:00
parent f09cfc53c2
commit 23780697fb
25 changed files with 1077 additions and 175 deletions
@@ -37,7 +37,7 @@ public class GetIndexNamesTests : BaseIndexTests
{
// Arrange
const string indexName = "theIndexName";
var token = new CancellationToken();
var token = new CancellationToken(true);
IndexHandler = new Mock<IMongoDbIndexHandler>();
IndexHandler
.Setup(x => x.GetIndexesNamesAsync<TestDocument, Guid>(null, token))
@@ -78,7 +78,7 @@ public class GetIndexNamesTests : BaseIndexTests
// Arrange
const string partitionKey = "thePartitionKey";
const string indexName = "theIndexName";
var token = new CancellationToken();
var token = new CancellationToken(true);
IndexHandler = new Mock<IMongoDbIndexHandler>();
IndexHandler
@@ -117,7 +117,7 @@ public class GetIndexNamesTests : BaseIndexTests
{
// Arrange
const string indexName = "theIndexName";
var token = new CancellationToken();
var token = new CancellationToken(true);
IndexHandler = new Mock<IMongoDbIndexHandler>();
IndexHandler
.Setup(x => x.GetIndexesNamesAsync<TestDocumentWithKey, int>(null, token))
@@ -157,7 +157,7 @@ public class GetIndexNamesTests : BaseIndexTests
// Arrange
const string indexName = "theIndexName";
const string partitionKey = "thePartitionKey";
var token = new CancellationToken();
var token = new CancellationToken(true);
IndexHandler = new Mock<IMongoDbIndexHandler>();
IndexHandler
@@ -171,4 +171,4 @@ public class GetIndexNamesTests : BaseIndexTests
Assert.NotNull(result);
Assert.Contains(result, x => x == indexName);
}*/
}
}