@@ -352,7 +352,7 @@ public void TypeTesting(string expression, Type type)
352
352
[ TestCase ( "6 % 3" , TestOf = typeof ( int ) , ExpectedResult = 0 , Category = "SimpleModulo" ) ]
353
353
#endregion
354
354
355
- #region BooleanTestsOperators
355
+ #region Boolean Tests Operators
356
356
[ TestCase ( "1 < 5" , TestOf = typeof ( bool ) , ExpectedResult = true , Category = "LowerThanBooleanOperator" ) ]
357
357
[ TestCase ( "5 < 5" , TestOf = typeof ( bool ) , ExpectedResult = false , Category = "LowerThanBooleanOperator" ) ]
358
358
[ TestCase ( "7 < 5" , TestOf = typeof ( bool ) , ExpectedResult = false , Category = "LowerThanBooleanOperator" ) ]
@@ -679,7 +679,9 @@ public void TypeTesting(string expression, Type type)
679
679
#endregion
680
680
681
681
#region new Function
682
- // TODO Tests For new Function
682
+ [ TestCase ( "New(ClassForTest1).GetType()" , ExpectedResult = typeof ( ClassForTest1 ) , Category = "Standard Functions,New Function" ) ]
683
+ [ TestCase ( "New(ClassForTest2, 15).GetType()" , ExpectedResult = typeof ( ClassForTest2 ) , Category = "Standard Functions,New Function" ) ]
684
+ [ TestCase ( "New(ClassForTest2, 15).Value1" , ExpectedResult = 15 , Category = "Standard Functions,New Function" ) ]
683
685
#endregion
684
686
685
687
#region Pow Function
@@ -789,6 +791,8 @@ public object DirectExpressionEvaluation(string expression)
789
791
{
790
792
ExpressionEvaluator evaluator = new ExpressionEvaluator ( ) ;
791
793
794
+ evaluator . Namespaces . Add ( "WpfMvvmFw.Utils.Tests" ) ;
795
+
792
796
return evaluator . Evaluate ( expression ) ;
793
797
}
794
798
0 commit comments