@@ -50,29 +50,28 @@ public override void TestFixtureSetUp()
50
50
[ Test ]
51
51
public void constructor_should_initialize_instance ( )
52
52
{
53
- var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _query , _messageEncoderSettings ) ;
53
+ var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _messageEncoderSettings ) ;
54
54
55
55
subject . CollectionNamespace . Should ( ) . BeSameAs ( _collectionNamespace ) ;
56
56
subject . OutputCollectionNamespace . Should ( ) . BeSameAs ( _outputCollectionNamespace ) ;
57
57
subject . MapFunction . Should ( ) . BeSameAs ( _mapFunction ) ;
58
58
subject . MessageEncoderSettings . Should ( ) . BeSameAs ( _messageEncoderSettings ) ;
59
- subject . Filter . Should ( ) . BeSameAs ( _query ) ;
60
59
subject . ReduceFunction . Should ( ) . BeSameAs ( _reduceFunction ) ;
61
60
subject . OutputMode . Should ( ) . Be ( MapReduceOutputMode . Replace ) ;
62
61
}
63
62
64
63
[ Test ]
65
64
public void constructor_should_throw_when_outputCollectionNamespace_is_null ( )
66
65
{
67
- Action action = ( ) => new MapReduceOutputToCollectionOperation ( _collectionNamespace , null , _mapFunction , _reduceFunction , _query , _messageEncoderSettings ) ;
66
+ Action action = ( ) => new MapReduceOutputToCollectionOperation ( _collectionNamespace , null , _mapFunction , _reduceFunction , _messageEncoderSettings ) ;
68
67
69
68
action . ShouldThrow < ArgumentNullException > ( ) . And . ParamName . Should ( ) . Be ( "outputCollectionNamespace" ) ;
70
69
}
71
70
72
71
[ Test ]
73
72
public void CreateOutputOptions_should_return_expected_result ( )
74
73
{
75
- var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _query , _messageEncoderSettings ) ;
74
+ var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _messageEncoderSettings ) ;
76
75
var subjectReflector = new Reflector ( subject ) ;
77
76
var expectedResult = new BsonDocument
78
77
{
@@ -88,7 +87,7 @@ public void CreateOutputOptions_should_return_expected_result()
88
87
[ Test ]
89
88
public void CreateOutputOptions_should_return_expected_result_when_ShardedOutput_is_provided ( )
90
89
{
91
- var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _query , _messageEncoderSettings )
90
+ var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _messageEncoderSettings )
92
91
{
93
92
ShardedOutput = true
94
93
} ;
@@ -108,7 +107,7 @@ public void CreateOutputOptions_should_return_expected_result_when_ShardedOutput
108
107
[ Test ]
109
108
public void CreateOutputOptions_should_return_expected_result_when_NonAtomicOutput_is_provided ( )
110
109
{
111
- var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _query , _messageEncoderSettings )
110
+ var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _messageEncoderSettings )
112
111
{
113
112
NonAtomicOutput = true
114
113
} ;
@@ -131,10 +130,9 @@ public async Task ExecuteAsync_should_return_expected_result()
131
130
{
132
131
await EnsureTestDataAsync ( ) ;
133
132
134
- var query = new BsonDocument ( ) ;
135
133
var mapFunction = "function() { emit(this.x, this.v); }" ;
136
134
var reduceFunction = "function(key, values) { var sum = 0; for (var i = 0; i < values.length; i++) { sum += values[i]; }; return sum; }" ;
137
- var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , mapFunction , reduceFunction , query , _messageEncoderSettings ) ;
135
+ var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , mapFunction , reduceFunction , _messageEncoderSettings ) ;
138
136
var expectedDocuments = new BsonDocument [ ]
139
137
{
140
138
new BsonDocument { { "_id" , 1 } , { "value" , 3 } } ,
@@ -152,7 +150,7 @@ public async Task ExecuteAsync_should_return_expected_result()
152
150
[ Test ]
153
151
public void ExecuteAsync_should_throw_when_binding_is_null ( )
154
152
{
155
- var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _query , _messageEncoderSettings ) ;
153
+ var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _messageEncoderSettings ) ;
156
154
157
155
Action action = ( ) => subject . ExecuteAsync ( null , CancellationToken . None ) ;
158
156
@@ -162,7 +160,7 @@ public void ExecuteAsync_should_throw_when_binding_is_null()
162
160
[ Test ]
163
161
public void NonAtomicOutput_should_get_and_set_value ( )
164
162
{
165
- var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _query , _messageEncoderSettings ) ;
163
+ var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _messageEncoderSettings ) ;
166
164
var value = true ;
167
165
168
166
subject . NonAtomicOutput = value ;
@@ -174,7 +172,7 @@ public void NonAtomicOutput_should_get_and_set_value()
174
172
[ Test ]
175
173
public void OutputCollectionNamespace_should_get__value ( )
176
174
{
177
- var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _query , _messageEncoderSettings ) ;
175
+ var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _messageEncoderSettings ) ;
178
176
179
177
var result = subject . OutputCollectionNamespace ;
180
178
@@ -184,7 +182,7 @@ public void OutputCollectionNamespace_should_get__value()
184
182
[ Test ]
185
183
public void OutputMode_should_get_and_set_value ( )
186
184
{
187
- var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _query , _messageEncoderSettings ) ;
185
+ var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _messageEncoderSettings ) ;
188
186
var value = MapReduceOutputMode . Merge ;
189
187
190
188
subject . OutputMode = value ;
@@ -196,7 +194,7 @@ public void OutputMode_should_get_and_set_value()
196
194
[ Test ]
197
195
public void ShardedOutput_should_get_and_set_value ( )
198
196
{
199
- var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _query , _messageEncoderSettings ) ;
197
+ var subject = new MapReduceOutputToCollectionOperation ( _collectionNamespace , _outputCollectionNamespace , _mapFunction , _reduceFunction , _messageEncoderSettings ) ;
200
198
var value = true ;
201
199
202
200
subject . ShardedOutput = value ;
0 commit comments