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;
|
||||
@@ -1053,6 +1054,25 @@ namespace CoreIntegrationTests.Infrastructure
|
||||
await SUT.DropIndexAsync<T>(expectedIndexName, PartitionKey);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CreateCombinedTextIndexAsync()
|
||||
{
|
||||
// Arrange
|
||||
const string expectedIndexName = "SomeContent2_text_SomeContent3_text";
|
||||
|
||||
// Act
|
||||
Expression <Func<T, object>> ex = x => x.SomeContent2;
|
||||
Expression <Func<T, object>> ex2 = x => x.SomeContent3;
|
||||
var result = await SUT.CreateCombinedTextIndexAsync<T>(new[] { ex, ex2 }, null, PartitionKey);
|
||||
|
||||
// Assert
|
||||
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T>(PartitionKey);
|
||||
Assert.Contains(expectedIndexName, listOfIndexNames);
|
||||
|
||||
// Cleanup
|
||||
await SUT.DropIndexAsync<T>(expectedIndexName, PartitionKey);
|
||||
}
|
||||
|
||||
#endregion Index Management
|
||||
|
||||
#region Test Utils
|
||||
|
||||
Reference in New Issue
Block a user