Skip to content

Commit b15b2d4

Browse files
committed
3
1 parent cc4e28b commit b15b2d4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/System.Linq.Dynamic.Core.Tests/Parser/ExpressionParserTests.Sum.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,31 @@ public void Parse_Aggregate_Sum_In_Sum_With_Predicate_On_Array()
8787
// Assert
8888
parser.Parse(typeof(double));
8989
}
90+
91+
[Fact]
92+
public void Parse_Aggregate_Sum_In_Sum_In_Sum_With_Predicate_On_ArrayArray()
93+
{
94+
// Arrange
95+
var childType = DynamicClassFactory.CreateType(
96+
[
97+
new DynamicProperty("DoubleArrayArray", typeof(double[][]))
98+
]);
99+
100+
var parentType = DynamicClassFactory.CreateType(
101+
[
102+
new DynamicProperty("SubFoos", childType.MakeArrayType())
103+
]);
104+
105+
// Act
106+
var parser = new ExpressionParser(
107+
[
108+
Expression.Parameter(parentType, "Foo")
109+
],
110+
"Foo.SubFoos.Sum(s => s.DoubleArrayArray.Sum(x => x.Sum()))",
111+
[],
112+
new ParsingConfig());
113+
114+
// Assert
115+
parser.Parse(typeof(double));
116+
}
90117
}

0 commit comments

Comments
 (0)