integration tested index management functionality
This commit is contained in:
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -1046,6 +1047,25 @@ namespace CoreIntegrationTests.Infrastructure
|
||||
await SUT.DropIndexAsync<T, TKey>(expectedIndexName, PartitionKey);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CreateCombinedTextIndexAsync()
|
||||
{
|
||||
// Arrange
|
||||
const string expectedIndexName = "SomeContent4_text_SomeContent5_text";
|
||||
|
||||
// Act
|
||||
Expression<Func<T, object>> ex = x => x.SomeContent4;
|
||||
Expression<Func<T, object>> ex2 = x => x.SomeContent5;
|
||||
var result = await SUT.CreateCombinedTextIndexAsync<T, TKey>(new[] { ex, ex2 }, null, PartitionKey);
|
||||
|
||||
// Assert
|
||||
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T, TKey>(PartitionKey);
|
||||
Assert.Contains(expectedIndexName, listOfIndexNames);
|
||||
|
||||
// Cleanup
|
||||
await SUT.DropIndexAsync<T, TKey>(expectedIndexName, PartitionKey);
|
||||
}
|
||||
|
||||
#endregion Index Management
|
||||
|
||||
#region Test Utils
|
||||
|
||||
Reference in New Issue
Block a user