File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,9 @@ class Constants {
62
62
static const String userContextId = "userContextId" ;
63
63
static const String userContext = "userContext" ;
64
64
static const String experiment = "experiment" ;
65
+ static const String experimentId = "experimentId" ;
65
66
static const String variation = "variation" ;
67
+ static const String variationId = "variationId" ;
66
68
static const String userId = "userId" ;
67
69
static const String vuid = "vuid" ;
68
70
static const String experimentKey = "experimentKey" ;
Original file line number Diff line number Diff line change @@ -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
@@ -179,7 +186,11 @@ class TestUtils {
179
186
static bool testDecisionNotificationPayload (
180
187
List notifications, int id, int actualID) {
181
188
if (notifications[id].type != "$actualID " ||
182
- notifications[id].userId != "test" ) {
189
+ notifications[id].userId != "test" ||
190
+ notifications[id].decisionInfo[Constants .experimentId] !=
191
+ "experiment_12345" ||
192
+ notifications[id].decisionInfo[Constants .variationId] !=
193
+ "variation_12345" ) {
183
194
return false ;
184
195
}
185
196
return true ;
You can’t perform that action at this time.
0 commit comments