This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-scxml.git


The following commit(s) were added to refs/heads/master by this push:
     new 772c468c Normalize local variable names
772c468c is described below

commit 772c468c380368e74efc811025daf0210ef6f99e
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Jul 14 14:10:33 2024 -0400

    Normalize local variable names
---
 .../scxml2/env/javascript/JavaScriptEngineTest.java      | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java
 
b/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java
index c662a94c..b48cb6b3 100644
--- 
a/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java
+++ 
b/src/test/java/org/apache/commons/scxml2/env/javascript/JavaScriptEngineTest.java
@@ -34,19 +34,19 @@ public class JavaScriptEngineTest {
 
     private JSEvaluator evaluator;
     private StateConfiguration stateConfiguration;
-    private JSContext _systemContext;
+    private JSContext systemContext;
     private JSContext context;
 
     @BeforeEach
     public void before() {
         evaluator = new JSEvaluator();
-        _systemContext = new JSContext();
-        final SCXMLSystemContext systemContext = new 
SCXMLSystemContext(_systemContext);
-        _systemContext.set(SCXMLSystemContext.SESSIONID_KEY, 
UUID.randomUUID().toString());
-        _systemContext.set(SCXMLSystemContext.SCXML_NAME_KEY, "test");
+        systemContext = new JSContext();
+        final SCXMLSystemContext localSystemContext = new 
SCXMLSystemContext(systemContext);
+        systemContext.set(SCXMLSystemContext.SESSIONID_KEY, 
UUID.randomUUID().toString());
+        systemContext.set(SCXMLSystemContext.SCXML_NAME_KEY, "test");
         stateConfiguration = new StateConfiguration();
-        
systemContext.getPlatformVariables().put(SCXMLSystemContext.STATUS_KEY, new 
Status(stateConfiguration));
-        context = new JSContext(systemContext);
+        
localSystemContext.getPlatformVariables().put(SCXMLSystemContext.STATUS_KEY, 
new Status(stateConfiguration));
+        context = new JSContext(localSystemContext);
     }
 
     @Test
@@ -76,7 +76,7 @@ public class JavaScriptEngineTest {
     public void testScxmlEvent() throws Exception {
         assertTrue(evaluator.evalCond(context, "_event === undefined"));
         final EventVariable event = new EventVariable("myEvent", 
EventVariable.TYPE_INTERNAL, null, null, null, null,"myData");
-        _systemContext.setLocal(SCXMLSystemContext.EVENT_KEY, event);
+        systemContext.setLocal(SCXMLSystemContext.EVENT_KEY, event);
         assertFalse(evaluator.evalCond(context, "_event === undefined"));
         assertTrue(evaluator.evalCond(context, "_event.name == 'myEvent'"));
         assertTrue(evaluator.evalCond(context, "_event.type == 'internal'"));

Reply via email to