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 {
6262 static const String userContextId = "userContextId" ;
6363 static const String userContext = "userContext" ;
6464 static const String experiment = "experiment" ;
65+ static const String experimentId = "experimentId" ;
6566 static const String variation = "variation" ;
67+ static const String variationId = "variationId" ;
6668 static const String userId = "userId" ;
6769 static const String vuid = "vuid" ;
6870 static const String experimentKey = "experimentKey" ;
Original file line number Diff line number Diff line change @@ -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
@@ -179,7 +186,11 @@ class TestUtils {
179186 static bool testDecisionNotificationPayload (
180187 List notifications, int id, int actualID) {
181188 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" ) {
183194 return false ;
184195 }
185196 return true ;
You can’t perform that action at this time.
0 commit comments