@@ -123,7 +123,7 @@ public void Search_should_add_expected_stage()
123
123
{
124
124
var pipeline = new EmptyPipelineDefinition < BsonDocument > ( ) ;
125
125
var builder = new SearchDefinitionBuilder < BsonDocument > ( ) ;
126
- var result = pipeline . Search ( builder . Text ( "foo " , "bar " ) ) ;
126
+ var result = pipeline . Search ( builder . Text ( "bar " , "foo " ) ) ;
127
127
var stages = RenderStages ( result , BsonDocumentSerializer . Instance ) ;
128
128
stages [ 0 ] . Should ( ) . Be (
129
129
BsonDocument . Parse ( "{ $search: { text: { query: 'foo', path: 'bar' } } }" ) ) ;
@@ -134,7 +134,7 @@ public void Search_should_add_expected_stage_with_highlight()
134
134
{
135
135
var pipeline = new EmptyPipelineDefinition < BsonDocument > ( ) ;
136
136
var builder = new SearchDefinitionBuilder < BsonDocument > ( ) ;
137
- var result = pipeline . Search ( builder . Text ( "foo " , "bar " ) , new SearchHighlightOptions < BsonDocument > ( "foo" ) ) ;
137
+ var result = pipeline . Search ( builder . Text ( "bar " , "foo " ) , new SearchHighlightOptions < BsonDocument > ( "foo" ) ) ;
138
138
var stages = RenderStages ( result , BsonDocumentSerializer . Instance ) ;
139
139
stages [ 0 ] . Should ( ) . BeEquivalentTo (
140
140
BsonDocument . Parse ( "{ $search: { text: { query: 'foo', path: 'bar' }, highlight: { path: 'foo' } } }" ) ) ;
@@ -145,7 +145,7 @@ public void Search_should_add_expected_stage_with_index()
145
145
{
146
146
var pipeline = new EmptyPipelineDefinition < BsonDocument > ( ) ;
147
147
var builder = new SearchDefinitionBuilder < BsonDocument > ( ) ;
148
- var result = pipeline . Search ( builder . Text ( "foo " , "bar " ) , indexName : "foo" ) ;
148
+ var result = pipeline . Search ( builder . Text ( "bar " , "foo " ) , indexName : "foo" ) ;
149
149
var stages = RenderStages ( result , BsonDocumentSerializer . Instance ) ;
150
150
stages [ 0 ] . Should ( ) . Be (
151
151
BsonDocument . Parse ( "{ $search: { text: { query: 'foo', path: 'bar' }, index: 'foo' } }" ) ) ;
@@ -160,7 +160,7 @@ public void Search_should_add_expected_stage_with_count()
160
160
{
161
161
Type = SearchCountType . Total
162
162
} ;
163
- var result = pipeline . Search ( builder . Text ( "foo " , "bar " ) , count : count ) ;
163
+ var result = pipeline . Search ( builder . Text ( "bar " , "foo " ) , count : count ) ;
164
164
var stages = RenderStages ( result , BsonDocumentSerializer . Instance ) ;
165
165
stages [ 0 ] . Should ( ) . Be (
166
166
BsonDocument . Parse ( "{ $search: { text: { query: 'foo', path: 'bar' }, count: { type: 'total' } } }" ) ) ;
@@ -171,7 +171,7 @@ public void Search_should_add_expected_stage_with_return_stored_source()
171
171
{
172
172
var pipeline = new EmptyPipelineDefinition < BsonDocument > ( ) ;
173
173
var builder = new SearchDefinitionBuilder < BsonDocument > ( ) ;
174
- var result = pipeline . Search ( builder . Text ( "foo " , "bar " ) , returnStoredSource : true ) ;
174
+ var result = pipeline . Search ( builder . Text ( "bar " , "foo " ) , returnStoredSource : true ) ;
175
175
var stages = RenderStages ( result , BsonDocumentSerializer . Instance ) ;
176
176
stages [ 0 ] . Should ( ) . Be (
177
177
BsonDocument . Parse ( "{ $search: { text: { query: 'foo', path: 'bar' }, returnStoredSource: true } }" ) ) ;
@@ -182,7 +182,7 @@ public void Search_should_throw_when_pipeline_is_null()
182
182
{
183
183
PipelineDefinition < BsonDocument , BsonDocument > pipeline = null ;
184
184
var builder = new SearchDefinitionBuilder < BsonDocument > ( ) ;
185
- var exception = Record . Exception ( ( ) => pipeline . Search ( builder . Text ( "foo " , "bar " ) ) ) ;
185
+ var exception = Record . Exception ( ( ) => pipeline . Search ( builder . Text ( "bar " , "foo " ) ) ) ;
186
186
exception . Should ( ) . BeOfType < ArgumentNullException > ( )
187
187
. Which . ParamName . Should ( ) . Be ( "pipeline" ) ;
188
188
}
@@ -201,7 +201,7 @@ public void SearchMeta_should_add_expected_stage()
201
201
{
202
202
var pipeline = new EmptyPipelineDefinition < BsonDocument > ( ) ;
203
203
var builder = new SearchDefinitionBuilder < BsonDocument > ( ) ;
204
- var result = pipeline . SearchMeta ( builder . Text ( "foo " , "bar " ) ) ;
204
+ var result = pipeline . SearchMeta ( builder . Text ( "bar " , "foo " ) ) ;
205
205
var stages = RenderStages ( result , BsonDocumentSerializer . Instance ) ;
206
206
stages [ 0 ] . Should ( ) . Be (
207
207
BsonDocument . Parse ( "{ $searchMeta: { text: { query: 'foo', path: 'bar' } } }" ) ) ;
@@ -212,7 +212,7 @@ public void SearchMeta_should_add_expected_stage_with_index()
212
212
{
213
213
var pipeline = new EmptyPipelineDefinition < BsonDocument > ( ) ;
214
214
var builder = new SearchDefinitionBuilder < BsonDocument > ( ) ;
215
- var result = pipeline . SearchMeta ( builder . Text ( "foo " , "bar " ) , indexName : "foo" ) ;
215
+ var result = pipeline . SearchMeta ( builder . Text ( "bar " , "foo " ) , indexName : "foo" ) ;
216
216
var stages = RenderStages ( result , BsonDocumentSerializer . Instance ) ;
217
217
stages [ 0 ] . Should ( ) . Be (
218
218
BsonDocument . Parse ( "{ $searchMeta: { text: { query: 'foo', path: 'bar' }, index: 'foo' } }" ) ) ;
@@ -227,7 +227,7 @@ public void SearchMeta_should_add_expected_stage_with_count()
227
227
{
228
228
Type = SearchCountType . Total
229
229
} ;
230
- var result = pipeline . SearchMeta ( builder . Text ( "foo " , "bar " ) , count : count ) ;
230
+ var result = pipeline . SearchMeta ( builder . Text ( "bar " , "foo " ) , count : count ) ;
231
231
var stages = RenderStages ( result , BsonDocumentSerializer . Instance ) ;
232
232
stages [ 0 ] . Should ( ) . Be (
233
233
BsonDocument . Parse ( "{ $searchMeta: { text: { query: 'foo', path: 'bar' }, count: { type: 'total' } } }" ) ) ;
@@ -238,7 +238,7 @@ public void SearchMeta_should_throw_when_pipeline_is_null()
238
238
{
239
239
PipelineDefinition < BsonDocument , BsonDocument > pipeline = null ;
240
240
var builder = new SearchDefinitionBuilder < BsonDocument > ( ) ;
241
- var exception = Record . Exception ( ( ) => pipeline . SearchMeta ( builder . Text ( "foo " , "bar " ) ) ) ;
241
+ var exception = Record . Exception ( ( ) => pipeline . SearchMeta ( builder . Text ( "bar " , "foo " ) ) ) ;
242
242
exception . Should ( ) . BeOfType < ArgumentNullException > ( )
243
243
. Which . ParamName . Should ( ) . Be ( "pipeline" ) ;
244
244
}
0 commit comments