@@ -1153,12 +1153,32 @@ public static IEnumerable<TestCaseData> TestCasesForWithCustomVariablesExpressio
11531153 yield return new TestCaseData ( "string.IsNullOrEmpty(nullVar) || nullVar.StartsWith(\" ABC\" ) == false" , onInstanceVariables , true ) . SetCategory ( "Instance Property,Or Conditional" ) . Returns ( true ) ;
11541154 yield return new TestCaseData ( "!string.IsNullOrEmpty(nullVar) && nullVar.Length < 2" , onInstanceVariables , true ) . SetCategory ( "Instance Property,And Conditional" ) . Returns ( false ) ;
11551155 yield return new TestCaseData ( "string.IsNullOrEmpty(nullVar) || nullVar.Length < 2" , onInstanceVariables , true ) . SetCategory ( "Instance Property,Or Conditional" ) . Returns ( true ) ;
1156- yield return new TestCaseData ( "true || 1/0 == 0" , onInstanceVariables , true ) . SetCategory ( "Instance Property,Or Conditional" ) . Returns ( true ) ;
1156+ yield return new TestCaseData ( "true || 1/0 == 0" , onInstanceVariables , true ) . SetCategory ( "Instance Property,Or Conditional" ) . Returns ( true ) ;
11571157 yield return new TestCaseData ( "false && true || true" , onInstanceVariables , true ) . SetCategory ( "Instance Property,Or Conditional,And Conditional,Precedence check" ) . Returns ( true ) ;
11581158 yield return new TestCaseData ( "true || true && false" , onInstanceVariables , true ) . SetCategory ( "Instance Property,Or Conditional,And Conditional,Precedence check" ) . Returns ( true ) ;
11591159 yield return new TestCaseData ( "false && nullVar.What ? nullVar.Text : \" Hello\" " , onInstanceVariables , true ) . SetCategory ( "Instance Property,Ternary operator, And Conditional" ) . Returns ( "Hello" ) ;
11601160 yield return new TestCaseData ( "false && (false && nullVar.What ? nullVar.boolValue : true) ? nullVar.Text : \" Hello\" " , onInstanceVariables , true ) . SetCategory ( "Instance Property,Ternary operator, And Conditional" ) . Returns ( "Hello" ) ;
11611161
1162+ #endregion
1163+
1164+ #region ExpandoObject
1165+
1166+ dynamic MyDynamic = new System . Dynamic . ExpandoObject ( ) ;
1167+ MyDynamic . NullValue = null ;
1168+ MyDynamic . Number = 11 ;
1169+
1170+ Dictionary < string , object > ExpandoObjectVariables = new Dictionary < string , object > ( )
1171+ {
1172+ { "expObj" , MyDynamic } ,
1173+ } ;
1174+
1175+ yield return new TestCaseData ( "expObj.Number" , ExpandoObjectVariables , true ) . SetCategory ( "ExpandoObject" ) . SetCategory ( "Instance Property" ) . Returns ( 11 ) ;
1176+
1177+ #region bug #67
1178+ yield return new TestCaseData ( "expObj.NullValue" , ExpandoObjectVariables , true ) . SetCategory ( "ExpandoObject" ) . SetCategory ( "Instance Property" ) . Returns ( null ) ;
1179+ yield return new TestCaseData ( "expObj.NullValue ?? \" A\" " , ExpandoObjectVariables , true ) . SetCategory ( "ExpandoObject" ) . SetCategory ( "Instance Property" ) . Returns ( "A" ) ;
1180+ #endregion
1181+
11621182
11631183 #endregion
11641184
0 commit comments