Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public void Nested__SelectMany_with_ArrayOfArrays_representation_should_work()

var queryable = collection.AsQueryable()
.OfType<C>()
.Where( to => to.Name == "TestName" )
.Select( to => to.DictionaryWithArrayOfArraysRepresentation.SelectMany(kvp => new KeyValuePair<string, string>[] { kvp }) );
.Where(to => to.Name == "TestName")
.Select(to => to.DictionaryWithArrayOfArraysRepresentation.SelectMany(kvp => new KeyValuePair<string, string>[] { kvp }));

var stages = Translate(collection, queryable);
AssertStages(
Expand All @@ -57,8 +57,8 @@ public void Nested__SelectMany_with_ArrayOfDocuments_representation_should_work(

var queryable = collection.AsQueryable()
.OfType<C>()
.Where( to => to.Name == "TestName" )
.Select( to => to.DictionaryWithArrayOfDocumentsRepresentation.SelectMany(kvp => new KeyValuePair<string, string>[] { kvp }) );
.Where(to => to.Name == "TestName")
.Select(to => to.DictionaryWithArrayOfDocumentsRepresentation.SelectMany(kvp => new KeyValuePair<string, string>[] { kvp }));

var stages = Translate(collection, queryable);
AssertStages(
Expand All @@ -77,8 +77,8 @@ public void Nested_SelectMany_with_Document_representation_should_work()

var queryable = collection.AsQueryable()
.OfType<C>()
.Where( to => to.Name == "TestName" )
.Select( to => to.DictionaryWithDocumentRepresentation.SelectMany(kvp => new KeyValuePair<string, string>[] { kvp }) );
.Where(to => to.Name == "TestName")
.Select(to => to.DictionaryWithDocumentRepresentation.SelectMany(kvp => new KeyValuePair<string, string>[] { kvp }));

var stages = Translate(collection, queryable);
AssertStages(
Expand All @@ -97,8 +97,8 @@ public void Top_level_SelectMany_with_ArrayOfArrays_representation_should_work()

var queryable = collection.AsQueryable()
.OfType<C>()
.Where( to => to.Name == "TestName" )
.SelectMany( to => to.DictionaryWithArrayOfArraysRepresentation );
.Where(to => to.Name == "TestName")
.SelectMany(to => to.DictionaryWithArrayOfArraysRepresentation);

var stages = Translate(collection, queryable);
AssertStages(
Expand All @@ -124,8 +124,8 @@ public void Top_level_SelectMany_with_ArrayOfDocuments_representation_should_wor

var queryable = collection.AsQueryable()
.OfType<C>()
.Where( to => to.Name == "TestName" )
.SelectMany( to => to.DictionaryWithArrayOfDocumentsRepresentation );
.Where(to => to.Name == "TestName")
.SelectMany(to => to.DictionaryWithArrayOfDocumentsRepresentation);

var stages = Translate(collection, queryable);
AssertStages(
Expand All @@ -151,8 +151,8 @@ public void Top_level_SelectMany_with_Document_representation_should_work()

var queryable = collection.AsQueryable()
.OfType<C>()
.Where( to => to.Name == "TestName" )
.SelectMany( to => to.DictionaryWithDocumentRepresentation);
.Where(to => to.Name == "TestName")
.SelectMany(to => to.DictionaryWithDocumentRepresentation);

var stages = Translate(collection, queryable);
AssertStages(
Expand All @@ -176,14 +176,14 @@ public class C
public int Id { get; set; }
public string Name {get;set;}

[BsonDictionaryOptions( DictionaryRepresentation.ArrayOfArrays )]
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
public Dictionary<string,string> DictionaryWithArrayOfArraysRepresentation { get; set; } = new Dictionary<string, string>();


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a double blank line here, we should remove one

[BsonDictionaryOptions( DictionaryRepresentation.ArrayOfDocuments )]
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfDocuments)]
public Dictionary<string,string> DictionaryWithArrayOfDocumentsRepresentation { get; set; } = new Dictionary<string, string>();

[BsonDictionaryOptions( DictionaryRepresentation.Document )]
[BsonDictionaryOptions(DictionaryRepresentation.Document)]
public Dictionary<string,string> DictionaryWithDocumentRepresentation { get; set; } = new Dictionary<string, string>();
}

Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in our meeting, we can remove this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this test serves a useful purpose in proving that this PR also fixes 4251 but at your request I will remove it.

This file was deleted.