File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
src/Tests/Nest.Tests.Unit
ObjectInitializer/Aliases Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 257257 <Compile Include =" Internals\Serialize\NullValueHandlingTests.cs" />
258258 <Compile Include =" Internals\Serialize\OptOutTests.cs" />
259259 <Compile Include =" Internals\Serialize\CustomConvertersTests.cs" />
260+ <Compile Include =" ObjectInitializer\Aliases\AliasFilterRequestTests.cs" />
260261 <Compile Include =" ObjectInitializer\Aliases\GetAliasMoreUrlTests.cs" />
261262 <Compile Include =" ObjectInitializer\Aliases\GetAliasesMoreUrlTests.cs" />
262263 <Compile Include =" ObjectInitializer\Aliases\GetAliasRequestTests.cs" />
727728 <None Include =" Internals\Serialize\OptOutDuringMapping.json" >
728729 <CopyToOutputDirectory >Always</CopyToOutputDirectory >
729730 </None >
731+ <None Include =" ObjectInitializer\Aliases\AliasFilterBody.json" >
732+ <CopyToOutputDirectory >Always</CopyToOutputDirectory >
733+ </None >
730734 <None Include =" ObjectInitializer\Aliases\AliasBody.json" >
731735 <CopyToOutputDirectory >Always</CopyToOutputDirectory >
732736 </None >
Original file line number Diff line number Diff line change 1+ {
2+ "actions" : [
3+ {
4+ "add" : {
5+ "index" : " myindex-2014-2-2" ,
6+ "alias" : " myindex" ,
7+ "filter" : { "term" : { "test" : " this_test" } }
8+ }
9+ }
10+ ]
11+ }
Original file line number Diff line number Diff line change 1+ using System . Reflection ;
2+ using Elasticsearch . Net ;
3+ using NUnit . Framework ;
4+
5+ namespace Nest . Tests . Unit . ObjectInitializer . Aliases
6+ {
7+ [ TestFixture ]
8+ public class AliasFilterRequestTests : BaseJsonTests
9+ {
10+ private readonly IElasticsearchResponse _status ;
11+
12+ public AliasFilterRequestTests ( )
13+ {
14+ var response = _client . Alias ( x => x . Add (
15+ addAction => addAction
16+ . Index ( "myindex-2014-2-2" )
17+ . Alias ( "myindex" )
18+ . Filter < object > ( filter => filter . Raw ( " { \" term\" : { \" test\" : \" this_test\" } }" ) )
19+ ) ) ;
20+ _status = response . ConnectionStatus ;
21+ }
22+
23+ [ Test ]
24+ public void AliasFilterBody ( )
25+ {
26+ JsonEquals ( _status . Request , MethodBase . GetCurrentMethod ( ) ) ;
27+ }
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments