@@ -64,7 +64,7 @@ protected void assertList(String[] expecteds, String actual) {
6464
6565 @ Test
6666 public void testEvaluation1 () throws Exception {
67- SysMLInteractive instance = getSysMLInteractiveInstance ();
67+ SysMLInteractive instance = createSysMLInteractiveInstance ();
6868 process (instance , evalTest1 );
6969 assertElement ("LiteralInteger 3" , instance .eval ("p11.a2" , "EvalTest1" ));
7070 assertElement ("LiteralInteger 2" , instance .eval ("p11.p11.a2" , "EvalTest1" ));
@@ -88,7 +88,7 @@ public void testEvaluation1() throws Exception {
8888
8989 @ Test
9090 public void testEvaluation2 () throws Exception {
91- SysMLInteractive instance = getSysMLInteractiveInstance ();
91+ SysMLInteractive instance = createSysMLInteractiveInstance ();
9292 process (instance , evalTest2 );
9393 assertElement ("LiteralInteger 1" , instance .eval ("p1.a1" , "EvalTest2" ));
9494 assertElement ("LiteralInteger 2" , instance .eval ("p2.a2" , "EvalTest2" ));
@@ -114,7 +114,7 @@ public void testEvaluation2() throws Exception {
114114
115115 @ Test
116116 public void testEvaluation3 () throws Exception {
117- SysMLInteractive instance = getSysMLInteractiveInstance ();
117+ SysMLInteractive instance = createSysMLInteractiveInstance ();
118118 process (instance , evalTest3 );
119119 assertElement ("AttributeUsage a1" , instance .eval ("p1.a1" , "EvalTest3" ));
120120 assertElement ("OperatorExpression +" , instance .eval ("p1.a2" , "EvalTest3" ));
@@ -142,7 +142,7 @@ public void testEvaluation3() throws Exception {
142142
143143 @ Test
144144 public void testEvaluation4 () throws Exception {
145- SysMLInteractive instance = getSysMLInteractiveInstance ();
145+ SysMLInteractive instance = createSysMLInteractiveInstance ();
146146 process (instance , evalTest4 );
147147 assertElement ("AttributeUsage a1" , instance .eval ("p1.a1" , "EvalTest4" ));
148148 assertElement ("LiteralInteger 3" , instance .eval ("p1.a2" , "EvalTest4" ));
@@ -185,7 +185,7 @@ public void testEvaluation4() throws Exception {
185185
186186 @ Test
187187 public void testEvaluation5 () throws Exception {
188- SysMLInteractive instance = getSysMLInteractiveInstance ();
188+ SysMLInteractive instance = createSysMLInteractiveInstance ();
189189 process (instance , evalTest5 );
190190 assertElement ("LiteralBoolean true" , instance .eval ("p1.c1()" , "EvalTest5" ));
191191 assertElement ("LiteralBoolean false" , instance .eval ("p1.c2()" , "EvalTest5" ));
@@ -229,7 +229,7 @@ public void testEvaluation5() throws Exception {
229229
230230 @ Test
231231 public void testEvaluation6 () throws Exception {
232- SysMLInteractive instance = getSysMLInteractiveInstance ();
232+ SysMLInteractive instance = createSysMLInteractiveInstance ();
233233 process (instance , evalTest6 );
234234 assertElement ("LiteralInteger 10" , instance .eval ("p1.a" , "EvalTest6" ));
235235 assertElement ("LiteralInteger 17" , instance .eval ("p1.z1" , "EvalTest6" ));
@@ -259,7 +259,7 @@ public void testEvaluation6() throws Exception {
259259
260260 @ Test
261261 public void testEvaluation7 () throws Exception {
262- SysMLInteractive instance = getSysMLInteractiveInstance ();
262+ SysMLInteractive instance = createSysMLInteractiveInstance ();
263263 process (instance , evalTest7 );
264264 assertElement ("LiteralInteger 1" , instance .eval ("test.fact1" , "EvalTest7" ));
265265 assertElement ("LiteralInteger 120" , instance .eval ("test.fact5" , "EvalTest7" ));
@@ -287,7 +287,7 @@ public void testEvaluation7() throws Exception {
287287
288288 @ Test
289289 public void testChainEvaluation () throws Exception {
290- SysMLInteractive instance = getSysMLInteractiveInstance ();
290+ SysMLInteractive instance = createSysMLInteractiveInstance ();
291291 process (instance , chainTest );
292292 assertElement ("LiteralInteger 1" , instance .eval ("y.a.z" , "ChainTest" ));
293293 }
@@ -318,7 +318,7 @@ public void testChainEvaluation() throws Exception {
318318
319319 @ Test
320320 public void testIndexOperator () throws Exception {
321- SysMLInteractive instance = getSysMLInteractiveInstance ();
321+ SysMLInteractive instance = createSysMLInteractiveInstance ();
322322 process (instance , indexOperatorTest );
323323 assertElement ("LiteralString a" , instance .eval ("seq#(1)" , "IndexOperatorTest" ));
324324 assertElement ("LiteralString b" , instance .eval ("seq#(2)" , "IndexOperatorTest" ));
@@ -352,7 +352,7 @@ public void testIndexOperator() throws Exception {
352352
353353 @ Test
354354 public void testInvocationEvaluation () throws Exception {
355- SysMLInteractive instance = getSysMLInteractiveInstance ();
355+ SysMLInteractive instance = createSysMLInteractiveInstance ();
356356 process (instance , invocationTest );
357357 assertList (new String [] {"LiteralInteger 1" , "LiteralInteger 2" }, instance .eval ("Test(1, 2)" , "InvocationTest" ));
358358 assertList (new String [] {"LiteralInteger 1" , "LiteralInteger 2" }, instance .eval ("Test(x = 1, y = 2)" , "InvocationTest" ));
@@ -363,7 +363,7 @@ public void testInvocationEvaluation() throws Exception {
363363
364364 @ Test
365365 public void testArithmeticEvaluation () throws Exception {
366- SysMLInteractive instance = getSysMLInteractiveInstance ();
366+ SysMLInteractive instance = createSysMLInteractiveInstance ();
367367 assertElement ("LiteralInteger 5" , instance .eval ("2 + 3" , null ));
368368 assertElement ("LiteralInteger -1" , instance .eval ("2 - 3" , null ));
369369 assertElement ("LiteralInteger 6" , instance .eval ("2 * 3" , null ));
@@ -374,7 +374,7 @@ public void testArithmeticEvaluation() throws Exception {
374374
375375 @ Test
376376 public void testListOpsExpression () throws Exception {
377- SysMLInteractive instance = getSysMLInteractiveInstance ();
377+ SysMLInteractive instance = createSysMLInteractiveInstance ();
378378 assertList (new String [] {}, instance .eval ("null" , null ));
379379 assertList (new String [] {}, instance .eval ("()" , null ));
380380 assertList (new String []{"LiteralInteger 1" , "LiteralInteger 2" , "LiteralInteger 3" }, instance .eval ("(1, 2, 3)" , null ));
@@ -384,14 +384,14 @@ public void testListOpsExpression() throws Exception {
384384
385385 @ Test
386386 public void testControlOpEvaluation () throws Exception {
387- SysMLInteractive instance = getSysMLInteractiveInstance ();
387+ SysMLInteractive instance = createSysMLInteractiveInstance ();
388388 assertList (new String [] {"LiteralInteger 2" , "LiteralInteger 4" , "LiteralInteger 6" }, instance .eval ("(1,2,3).{in x : ScalarValues::Integer; x * 2}" , null ));
389389 assertList (new String [] {"LiteralInteger 1" , "LiteralInteger 2" }, instance .eval ("(1,2,3).?{in x : ScalarValues::Integer; x < 3}" , null ));
390390 }
391391
392392 @ Test
393393 public void testDataFunctionEvaluation () throws Exception {
394- SysMLInteractive instance = getSysMLInteractiveInstance ();
394+ SysMLInteractive instance = createSysMLInteractiveInstance ();
395395
396396 assertElement ("LiteralInteger 2" , instance .eval ("DataFunctions::max(1,2)" , null ));
397397 assertElement ("LiteralInteger 2" , instance .eval ("DataFunctions::max(2,1)" , null ));
@@ -416,14 +416,14 @@ public void testDataFunctionEvaluation() throws Exception {
416416
417417 @ Test
418418 public void testNumericalFunctionEvaluation () throws Exception {
419- SysMLInteractive instance = getSysMLInteractiveInstance ();
419+ SysMLInteractive instance = createSysMLInteractiveInstance ();
420420 assertElement ("LiteralInteger 6" , instance .eval ("NumericalFunctions::sum((1,2,3))" , null ));
421421 assertElement ("LiteralInteger 6" , instance .eval ("NumericalFunctions::product((1,2,3))" , null ));
422422 }
423423
424424 @ Test
425425 public void testSequenceFunctionEvaluation () throws Exception {
426- SysMLInteractive instance = getSysMLInteractiveInstance ();
426+ SysMLInteractive instance = createSysMLInteractiveInstance ();
427427 assertElement ("LiteralInteger 3" , instance .eval ("SequenceFunctions::size((1, 2, 3))" , null ));
428428
429429 assertElement ("LiteralBoolean true" , instance .eval ("SequenceFunctions::includes((1, 2, 3), 1)" , null ));
@@ -505,7 +505,7 @@ public void testSequenceFunctionEvaluation() throws Exception {
505505
506506 @ Test
507507 public void testCollectionFunctionEvaluation () throws Exception {
508- SysMLInteractive instance = getSysMLInteractiveInstance ();
508+ SysMLInteractive instance = createSysMLInteractiveInstance ();
509509 process (instance , collectionTest );
510510
511511 assertElement ("LiteralInteger 3" , instance .eval ("CollectionFunctions::size(collection123)" , "CollectionTest" ));
@@ -543,7 +543,7 @@ public void testCollectionFunctionEvaluation() throws Exception {
543543
544544 @ Test
545545 public void testControlFunctionEvaluation () throws Exception {
546- SysMLInteractive instance = getSysMLInteractiveInstance ();
546+ SysMLInteractive instance = createSysMLInteractiveInstance ();
547547 assertList (new String [] {"LiteralInteger 2" , "LiteralInteger 4" , "LiteralInteger 6" }, instance .eval ("(1,2,3)->ControlFunctions::collect{in x : ScalarValues::Integer; x * 2}" , null ));
548548 assertList (new String [] {"LiteralInteger 1" , "LiteralInteger 2" }, instance .eval ("(1,2,3)->ControlFunctions::select{in x : ScalarValues::Integer; x < 3}" , null ));
549549 assertList (new String [] {"LiteralInteger 1" }, instance .eval ("(1,2,3)->ControlFunctions::selectOne{in x : ScalarValues::Integer; x < 3}" , null ));
@@ -569,7 +569,7 @@ public void testControlFunctionEvaluation() throws Exception {
569569
570570 @ Test
571571 public void testTrigFunctionEvaluation () throws Exception {
572- SysMLInteractive instance = getSysMLInteractiveInstance ();
572+ SysMLInteractive instance = createSysMLInteractiveInstance ();
573573 assertElement ("LiteralRational " + Math .sin (2 ), instance .eval ("TrigFunctions::sin(2)" , null ));
574574 assertElement ("LiteralRational " + Math .sin (2.5 ), instance .eval ("TrigFunctions::sin(2.5)" , null ));
575575 assertElement ("LiteralRational " + Math .cos (2 ), instance .eval ("TrigFunctions::cos(2)" , null ));
0 commit comments