@@ -250,7 +250,7 @@ public void TestGetVariationsForFeatureList_Holdout_DecisionReasons()
250
250
[ Test ]
251
251
public void TestImpressionEventForHoldout ( )
252
252
{
253
- var featureFlag = Config . FeatureKeyMap [ "test_flag_1" ] ;
253
+ var featureFlag = Config . FeatureKeyMap [ "test_flag_1" ] ;
254
254
var userAttributes = new UserAttributes ( ) ;
255
255
256
256
var eventDispatcher = new Event . Dispatcher . DefaultEventDispatcher ( LoggerMock . Object ) ;
@@ -271,24 +271,24 @@ public void TestImpressionEventForHoldout()
271
271
272
272
Assert . IsNotNull ( decision , "Decision should not be null" ) ;
273
273
Assert . IsNotNull ( decision . RuleKey , "RuleKey should not be null" ) ;
274
-
274
+
275
275
var actualHoldout = Config . Holdouts ? . FirstOrDefault ( h => h . Key == decision . RuleKey ) ;
276
276
277
- Assert . IsNotNull ( actualHoldout ,
277
+ Assert . IsNotNull ( actualHoldout ,
278
278
$ "RuleKey '{ decision . RuleKey } ' should correspond to a holdout experiment") ;
279
279
Assert . AreEqual ( featureFlag . Key , decision . FlagKey , "Flag key should match" ) ;
280
-
280
+
281
281
var holdoutVariation = actualHoldout . Variations . FirstOrDefault ( v => v . Key == decision . VariationKey ) ;
282
282
283
- Assert . IsNotNull ( holdoutVariation ,
283
+ Assert . IsNotNull ( holdoutVariation ,
284
284
$ "Variation '{ decision . VariationKey } ' should be from the chosen holdout '{ actualHoldout . Key } '") ;
285
-
285
+
286
286
Assert . AreEqual ( holdoutVariation . FeatureEnabled , decision . Enabled ,
287
287
"Enabled flag should match holdout variation's featureEnabled value" ) ;
288
-
288
+
289
289
EventProcessorMock . Verify ( ep => ep . Process ( It . IsAny < ImpressionEvent > ( ) ) , Times . Once ,
290
290
"Impression event should be processed exactly once for holdout decision" ) ;
291
-
291
+
292
292
EventProcessorMock . Verify ( ep => ep . Process ( It . Is < ImpressionEvent > ( ie =>
293
293
ie . Experiment . Key == actualHoldout . Key &&
294
294
ie . Experiment . Id == actualHoldout . Id &&
@@ -321,13 +321,13 @@ public void TestImpressionEventForHoldout_DisableDecisionEvent()
321
321
322
322
Assert . IsNotNull ( decision , "Decision should not be null" ) ;
323
323
Assert . IsNotNull ( decision . RuleKey , "User should be bucketed into a holdout" ) ;
324
-
324
+
325
325
var chosenHoldout = Config . Holdouts ? . FirstOrDefault ( h => h . Key == decision . RuleKey ) ;
326
326
327
327
Assert . IsNotNull ( chosenHoldout , $ "Holdout '{ decision . RuleKey } ' should exist in config") ;
328
-
328
+
329
329
Assert . AreEqual ( featureFlag . Key , decision . FlagKey , "Flag key should match" ) ;
330
-
330
+
331
331
EventProcessorMock . Verify ( ep => ep . Process ( It . IsAny < ImpressionEvent > ( ) ) , Times . Never ,
332
332
"No impression event should be processed when DISABLE_DECISION_EVENT option is used" ) ;
333
333
}
0 commit comments