File tree Expand file tree Collapse file tree
Orm/Xtensive.Orm.Tests/Linq Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1051,6 +1051,20 @@ public void GroupByBoolExpressionComplex()
10511051 Assert . AreEqual ( falseResult , result . Single ( i => ! i . Value ) . Count ) ;
10521052 Assert . AreEqual ( trueResult , result . Single ( i => i . Value ) . Count ) ;
10531053 }
1054+
1055+ [ Test ]
1056+ public void GroupByEnumTernaryWithNonNullConstTest ( )
1057+ {
1058+ var query = Session . Query . All < Invoice > ( )
1059+ . GroupBy ( c => c . Total < 0 ? ( InvoiceStatus ? ) InvoiceStatus . Completed : c . Status ) . ToArray ( ) ;
1060+ }
1061+
1062+ [ Test ]
1063+ public void GroupByEnumTernaryWithNullConstTest ( )
1064+ {
1065+ var query = Session . Query . All < Invoice > ( )
1066+ . GroupBy ( c => c . Total < 0 ? ( InvoiceStatus ? ) null : c . Status ) . ToArray ( ) ;
1067+ }
10541068
10551069 private void DumpGrouping < TKey , TValue > ( IQueryable < IGrouping < TKey , TValue > > result )
10561070 {
You can’t perform that action at this time.
0 commit comments