@@ -89,7 +89,14 @@ class TestUtils {
89
89
handler (MethodCall (Constants .decisionCallBackListener, {
90
90
Constants .id: id,
91
91
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
+ }
93
100
}));
94
101
}
95
102
@@ -129,7 +136,15 @@ class TestUtils {
129
136
Constants .eventKey: "$id " ,
130
137
Constants .userId: "test" ,
131
138
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
+ }
133
148
};
134
149
handler (MethodCall (Constants .trackCallBackListener, {
135
150
Constants .id: id,
@@ -145,6 +160,12 @@ class TestUtils {
145
160
Constants .attributes: {"test" : id},
146
161
Constants .eventTags: {
147
162
"testTag" : id,
163
+ "nestedTag" : {
164
+ "string_key" : "stringValue" ,
165
+ "int_key" : 123 ,
166
+ "double_key" : 123.456 ,
167
+ "bool_key" : true
168
+ },
148
169
"client_name" : clientName,
149
170
"client_version" : sdkVersion
150
171
}
@@ -179,7 +200,11 @@ class TestUtils {
179
200
static bool testDecisionNotificationPayload (
180
201
List notifications, int id, int actualID) {
181
202
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" ) {
183
208
return false ;
184
209
}
185
210
return true ;
0 commit comments