Skip to content

Commit

Permalink
Merge pull request #2270 from SanojPunchihewa/variable-trace
Browse files Browse the repository at this point in the history
Update PublishingEventTest with variables
  • Loading branch information
SanojPunchihewa authored Dec 20, 2024
2 parents b601051 + 0220d8f commit 5f70ade
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class PublishingEventTest {
private static final Integer FAULT_COUNT = 1;
private static final Integer HASHCODE = 12345;
private static final Map<String, Object> PROPERTY_MAP = new HashMap<>();
private static final Map<String, Object> VARIABLE_MAP = new HashMap<>();

/**
* Initializing PublishingEvent before tests.
Expand All @@ -62,6 +63,8 @@ public static void init() {
statisticDataUnit.setTime(START_TIME);
PROPERTY_MAP.put("1", new Integer(1));
statisticDataUnit.setContextPropertyMap(PROPERTY_MAP);
VARIABLE_MAP.put("var1", new String("John"));
statisticDataUnit.setContextVariableMap(VARIABLE_MAP);
StatisticsLog statisticsLog = new StatisticsLog(statisticDataUnit);
statisticsLog.setComponentType(ComponentType.ENDPOINT);
statisticsLog.setComponentName(COMPONENT_NAME);
Expand Down Expand Up @@ -106,6 +109,7 @@ public void testGetObjectList() {
Assert.assertEquals("comparing stored values", objectList.get(index++), AFTER_PAYLOAD);
Assert.assertEquals("null since not initialized", objectList.get(index++), PROPERTY_MAP.toString());
Assert.assertNull("null since not initialized", objectList.get(index++));
Assert.assertEquals("comparing stored variables", VARIABLE_MAP.toString(), objectList.get(index++));
Assert.assertEquals("comparing stored values", objectList.get(index++), Arrays.toString(CHILDREN));
Assert.assertEquals("comparing stored values", objectList.get(index++), ENTRY_POINT);
Assert.assertEquals("comparing stored values", objectList.get(index++),
Expand Down

0 comments on commit 5f70ade

Please sign in to comment.