File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
src/Tests/Nest.Tests.Unit/Search/Source Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "from" : 0 ,
3+ "size" : 10 ,
4+ "_source" : {
5+ "include" : [
6+ " name" ,
7+ " nestedFollowers"
8+ ],
9+ "exclude" : [
10+ " nestedFollowers.dateOfBirth"
11+ ]
12+ }
13+ }
Original file line number Diff line number Diff line change 1+ using System . Linq ;
2+ using System . Reflection ;
3+ using NUnit . Framework ;
4+ using Nest . Tests . MockData . Domain ;
5+
6+ namespace Nest . Tests . Unit . Search . Source
7+ {
8+ [ TestFixture ]
9+ public class SourceTests : BaseJsonTests
10+ {
11+ [ Test ]
12+ public void SourceSerializes ( )
13+ {
14+ var s = new SearchDescriptor < ElasticsearchProject > ( )
15+ . From ( 0 )
16+ . Size ( 10 )
17+ . Source ( source=> source
18+ . Include ( p=> p . Name , p=> p . NestedFollowers )
19+ . Exclude ( p=> p . NestedFollowers . First ( ) . DateOfBirth )
20+ ) ;
21+ this . JsonEquals ( s , MethodInfo . GetCurrentMethod ( ) ) ;
22+ }
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments