1- using System . Collections . Generic ;
1+ using System . Collections . Generic ;
22using System . Threading . Tasks ;
33using ExpressionEngine ;
44using ExpressionEngine . Functions . Base ;
55using ExpressionEngine . Functions . CustomException ;
66using Microsoft . Extensions . DependencyInjection ;
7- using NUnit . Framework ;
7+ using NUnit . Framework ; using NUnit . Framework . Legacy ;
8+ using NUnit . Framework . Legacy ;
89
910namespace Test
1011{
@@ -48,7 +49,7 @@ public async Task IndicesTest()
4849
4950 var result = await _expressionGrammar . EvaluateToString ( expressionString ) ;
5051
51- Assert . AreEqual ( "value" , result ) ;
52+ ClassicAssert . AreEqual ( "value" , result ) ;
5253 }
5354
5455 [ Test ]
@@ -58,16 +59,16 @@ public async Task BooleanTest()
5859
5960 await _expressionGrammar . EvaluateToValueContainer ( expressionString ) ;
6061
61- Assert . NotNull ( _dummyFunction . Parameters ) ;
62- Assert . AreEqual ( 2 , _dummyFunction . Parameters . Length ) ;
62+ ClassicAssert . NotNull ( _dummyFunction . Parameters ) ;
63+ ClassicAssert . AreEqual ( 2 , _dummyFunction . Parameters . Length ) ;
6364 var param1 = _dummyFunction . Parameters [ 0 ] ;
6465 var param2 = _dummyFunction . Parameters [ 1 ] ;
65- Assert . NotNull ( param1 ) ;
66- Assert . NotNull ( param2 ) ;
67- Assert . AreEqual ( ValueType . Boolean , param1 . Type ( ) ) ;
68- Assert . AreEqual ( ValueType . Boolean , param2 . Type ( ) ) ;
69- Assert . AreEqual ( true , param1 . GetValue < bool > ( ) ) ;
70- Assert . AreEqual ( false , param2 . GetValue < bool > ( ) ) ;
66+ ClassicAssert . NotNull ( param1 ) ;
67+ ClassicAssert . NotNull ( param2 ) ;
68+ ClassicAssert . AreEqual ( ValueType . Boolean , param1 . Type ( ) ) ;
69+ ClassicAssert . AreEqual ( ValueType . Boolean , param2 . Type ( ) ) ;
70+ ClassicAssert . AreEqual ( true , param1 . GetValue < bool > ( ) ) ;
71+ ClassicAssert . AreEqual ( false , param2 . GetValue < bool > ( ) ) ;
7172 }
7273
7374 [ Test ]
@@ -79,8 +80,8 @@ public async Task NullConditional()
7980
8081 var result = await _expressionGrammar . EvaluateToValueContainer ( expressionString ) ;
8182
82- Assert . NotNull ( result ) ;
83- Assert . AreEqual ( ValueType . Null , result . Type ( ) ) ;
83+ ClassicAssert . NotNull ( result ) ;
84+ ClassicAssert . AreEqual ( ValueType . Null , result . Type ( ) ) ;
8485 }
8586
8687 [ Test ]
@@ -90,10 +91,10 @@ public async Task IndexOnNonObject()
9091
9192 const string expressionString = "@dummyFunction()?.name1" ;
9293
93- var exception = Assert . ThrowsAsync < InvalidTemplateException > ( async ( ) =>
94+ var exception = ClassicAssert . ThrowsAsync < InvalidTemplateException > ( async ( ) =>
9495 await _expressionGrammar . EvaluateToValueContainer ( expressionString ) ) ;
9596
96- Assert . AreEqual ( "Unable to process template language expressions in action 'Compose' inputs " +
97+ ClassicAssert . AreEqual ( "Unable to process template language expressions in action 'Compose' inputs " +
9798 "at line 'x' and column 'y': 'The template language expression 'dummyFunction()?.name1' cannot be " +
9899 "evaluated because property 'name1' cannot be selected. Property selection is not supported on values " +
99100 "of type 'String'." , exception . Message ) ;
@@ -112,21 +113,21 @@ public async Task NegativeNumbers()
112113
113114 if ( functionOutput != null && functionOutput . Type ( ) == ValueType . String )
114115 {
115- Assert . AreNotEqual ( expressionString , functionOutput . GetValue < string > ( ) ) ;
116+ ClassicAssert . AreNotEqual ( expressionString , functionOutput . GetValue < string > ( ) ) ;
116117 }
117118
118119 var functionParameters = _dummyFunction . Parameters ;
119120
120- Assert . AreEqual ( 4 , functionParameters . Length ) ;
121- Assert . AreEqual ( ValueType . Integer , functionParameters [ 0 ] . Type ( ) ) ;
122- Assert . AreEqual ( ValueType . Float , functionParameters [ 1 ] . Type ( ) ) ;
123- Assert . AreEqual ( ValueType . Integer , functionParameters [ 2 ] . Type ( ) ) ;
124- Assert . AreEqual ( ValueType . Float , functionParameters [ 3 ] . Type ( ) ) ;
121+ ClassicAssert . AreEqual ( 4 , functionParameters . Length ) ;
122+ ClassicAssert . AreEqual ( ValueType . Integer , functionParameters [ 0 ] . Type ( ) ) ;
123+ ClassicAssert . AreEqual ( ValueType . Float , functionParameters [ 1 ] . Type ( ) ) ;
124+ ClassicAssert . AreEqual ( ValueType . Integer , functionParameters [ 2 ] . Type ( ) ) ;
125+ ClassicAssert . AreEqual ( ValueType . Float , functionParameters [ 3 ] . Type ( ) ) ;
125126
126- Assert . AreEqual ( expectedOutput1 , functionParameters [ 0 ] ) ;
127- Assert . AreEqual ( expectedOutput2 , functionParameters [ 1 ] ) ;
128- Assert . AreEqual ( expectedOutput3 , functionParameters [ 2 ] ) ;
129- Assert . AreEqual ( expectedOutput4 , functionParameters [ 3 ] ) ;
127+ ClassicAssert . AreEqual ( expectedOutput1 , functionParameters [ 0 ] ) ;
128+ ClassicAssert . AreEqual ( expectedOutput2 , functionParameters [ 1 ] ) ;
129+ ClassicAssert . AreEqual ( expectedOutput3 , functionParameters [ 2 ] ) ;
130+ ClassicAssert . AreEqual ( expectedOutput4 , functionParameters [ 3 ] ) ;
130131 }
131132 }
132133
0 commit comments