@@ -42,7 +42,7 @@ public void Group_should_generate_the_correct_group_when_a_result_type_is_not_sp
42
42
public void Group_should_generate_the_correct_document_using_expressions ( )
43
43
{
44
44
var subject = CreateSubject ( )
45
- . Group ( x => x . Age , g => new { Name = g . Select ( x => x . FirstName + " " + x . LastName ) . First ( ) } ) ;
45
+ . Group ( x => x . Age , g => new { Name = g . Select ( x => x . FirstName + " " + x . LastName ) . First ( ) } ) ;
46
46
47
47
var expectedGroup = BsonDocument . Parse ( "{$group: {_id: '$Age', Name: {'$first': { '$concat': ['$FirstName', ' ', '$LastName']}}}}" ) ;
48
48
@@ -176,6 +176,17 @@ public void Unwind_with_expression_to_BsonDocument_should_generate_the_correct_u
176
176
AssertLast ( subject , expectedUnwind ) ;
177
177
}
178
178
179
+ [ Test ]
180
+ public void Unwind_with_expression_to_new_result_should_generate_the_correct_unwind ( )
181
+ {
182
+ var subject = CreateSubject ( )
183
+ . Unwind < Person , BsonDocument > ( x => x . Age ) ;
184
+
185
+ var expectedUnwind = BsonDocument . Parse ( "{$unwind: '$Age'}" ) ;
186
+
187
+ AssertLast ( subject , expectedUnwind ) ;
188
+ }
189
+
179
190
[ Test ]
180
191
public void Unwind_should_generate_the_correct_unwind ( )
181
192
{
@@ -188,7 +199,7 @@ public void Unwind_should_generate_the_correct_unwind()
188
199
}
189
200
190
201
[ Test ]
191
- public void Unwind_with_expression_to_new_result_should_generate_the_correct_unwind ( )
202
+ public void Unwind_to_new_result_with_a_serializer_should_generate_the_correct_unwind ( )
192
203
{
193
204
var subject = CreateSubject ( )
194
205
. Unwind ( "Age" , BsonDocumentSerializer . Instance ) ;
0 commit comments