File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
src/Tests/Nest.Tests.Unit/Reproduce Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
4+ using System . Reflection ;
5+ using Elasticsearch . Net ;
6+ using FluentAssertions ;
7+ using Nest . Tests . MockData . Domain ;
8+ using NUnit . Framework ;
9+
10+ namespace Nest . Tests . Unit . Reproduce
11+ {
12+ /// <summary>
13+ /// tests to reproduce reported errors
14+ /// </summary>
15+ [ TestFixture ]
16+ public class Reproduce1566Tests : BaseJsonTests
17+ {
18+ [ Test ]
19+ public void RawSurvives ( )
20+ {
21+ var searchRequest = new SearchRequest ( )
22+ {
23+ Aggregations = new Dictionary < string , IAggregationContainer > ( ) ,
24+ } ;
25+
26+ var filterContainer = new AggregationContainer ( )
27+ {
28+ Filter = new FilterAggregator
29+ {
30+ Filter = new FilterDescriptor < dynamic > ( ) . Raw ( @"{""test"":""test""" )
31+ } ,
32+ Aggregations = new Dictionary < string , IAggregationContainer > ( )
33+ } ;
34+
35+ searchRequest . Aggregations [ "base_filter" ] = filterContainer ;
36+ var serialized = _client . Serializer . Serialize ( searchRequest ) . Utf8String ( ) ;
37+ serialized . Should ( ) . Contain ( @"""test""" ) ;
38+
39+ }
40+ }
41+ }
You can’t perform that action at this time.
0 commit comments