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()
82
82
) ;
83
83
this . AssertTermResults ( results ) ;
84
84
}
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
+ }
85
97
86
98
87
- private void AssertTermResults ( IQueryResponse < ElasticSearchProject > results )
99
+ private void AssertTermResults ( IQueryResponse < ElasticSearchProject > results , int expected = 1 )
88
100
{
89
101
Assert . True ( results . IsValid , results . ConnectionStatus . Result ) ;
90
102
Assert . True ( results . ConnectionStatus . Success , results . ConnectionStatus . Result ) ;
91
- Assert . AreEqual ( 1 , results . Total ) ;
103
+ Assert . AreEqual ( expected , results . Total ) ;
92
104
}
93
105
}
94
106
}
Original file line number Diff line number Diff line change 99
99
<Compile Include =" Integration\Filter\MissingExistsFilterTests.cs" />
100
100
<Compile Include =" Integration\Filter\PrefixFilterTests.cs" />
101
101
<Compile Include =" Integration\Filter\RangeFilterTests.cs" />
102
+ <Compile Include =" Integration\Query\TermToString.cs" />
102
103
<Compile Include =" Integration\Query\TextPhraseQueryTests.cs" />
103
104
<Compile Include =" Integration\Query\TextPhrasePrefixQueryTests.cs" />
104
105
<Compile Include =" Integration\Filter\NumericRangeFilterTests.cs" />
You can’t perform that action at this time.
0 commit comments