File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
src/Nest.Tests.Integration Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -82,13 +82,25 @@ public void DateTimeToStringTest()
8282 ) ;
8383 this . AssertTermResults ( results ) ;
8484 }
85+
86+ [ Test ]
87+ public void BoolToStringTests ( )
88+ {
89+ //this should serialize to ISO NOT simply datetime.tostring()!
90+ var results = _client . Search < ElasticSearchProject > ( s => s
91+ . Query ( q => q
92+ . Term ( p => p . BoolValue , _LookFor . BoolValue )
93+ )
94+ ) ;
95+ this . AssertTermResults ( results , 7 ) ;
96+ }
8597
8698
87- private void AssertTermResults ( IQueryResponse < ElasticSearchProject > results )
99+ private void AssertTermResults ( IQueryResponse < ElasticSearchProject > results , int expected = 1 )
88100 {
89101 Assert . True ( results . IsValid , results . ConnectionStatus . Result ) ;
90102 Assert . True ( results . ConnectionStatus . Success , results . ConnectionStatus . Result ) ;
91- Assert . AreEqual ( 1 , results . Total ) ;
103+ Assert . AreEqual ( expected , results . Total ) ;
92104 }
93105 }
94106}
Original file line number Diff line number Diff line change 9999 <Compile Include =" Integration\Filter\MissingExistsFilterTests.cs" />
100100 <Compile Include =" Integration\Filter\PrefixFilterTests.cs" />
101101 <Compile Include =" Integration\Filter\RangeFilterTests.cs" />
102+ <Compile Include =" Integration\Query\TermToString.cs" />
102103 <Compile Include =" Integration\Query\TextPhraseQueryTests.cs" />
103104 <Compile Include =" Integration\Query\TextPhrasePrefixQueryTests.cs" />
104105 <Compile Include =" Integration\Filter\NumericRangeFilterTests.cs" />
You can’t perform that action at this time.
0 commit comments