@@ -89,7 +89,14 @@ class TestUtils {
8989 handler (MethodCall (Constants .decisionCallBackListener, {
9090 Constants .id: id,
9191 Constants .sdkKey: sdkKey,
92- Constants .payload: {Constants .type: "$id " , Constants .userId: "test" }
92+ Constants .payload: < String , Object > {
93+ Constants .type: "$id " ,
94+ Constants .userId: "test" ,
95+ Constants .decisionInfo: const {
96+ Constants .experimentId: "experiment_12345" ,
97+ Constants .variationId: "variation_12345" ,
98+ },
99+ }
93100 }));
94101 }
95102
@@ -129,7 +136,15 @@ class TestUtils {
129136 Constants .eventKey: "$id " ,
130137 Constants .userId: "test" ,
131138 Constants .attributes: {"test" : id},
132- Constants .eventTags: {"testTag" : id}
139+ Constants .eventTags: {
140+ "testTag" : id,
141+ "nestedTag" : {
142+ "string_key" : "stringValue" ,
143+ "int_key" : 123 ,
144+ "double_key" : 123.456 ,
145+ "bool_key" : true
146+ }
147+ }
133148 };
134149 handler (MethodCall (Constants .trackCallBackListener, {
135150 Constants .id: id,
@@ -145,6 +160,12 @@ class TestUtils {
145160 Constants .attributes: {"test" : id},
146161 Constants .eventTags: {
147162 "testTag" : id,
163+ "nestedTag" : {
164+ "string_key" : "stringValue" ,
165+ "int_key" : 123 ,
166+ "double_key" : 123.456 ,
167+ "bool_key" : true
168+ },
148169 "client_name" : clientName,
149170 "client_version" : sdkVersion
150171 }
@@ -179,7 +200,11 @@ class TestUtils {
179200 static bool testDecisionNotificationPayload (
180201 List notifications, int id, int actualID) {
181202 if (notifications[id].type != "$actualID " ||
182- notifications[id].userId != "test" ) {
203+ notifications[id].userId != "test" ||
204+ notifications[id].decisionInfo[Constants .experimentId] !=
205+ "experiment_12345" ||
206+ notifications[id].decisionInfo[Constants .variationId] !=
207+ "variation_12345" ) {
183208 return false ;
184209 }
185210 return true ;
0 commit comments