@@ -339,6 +339,12 @@ public void TestDecisionNotificationSentWhenSendFlagDecisionsFalseAndFeature()
339339 {
340340 "decisionEventDispatched" , true
341341 } ,
342+ {
343+ "experimentId" , "7718750065"
344+ } ,
345+ {
346+ "variationId" , "7713030086"
347+ }
342348 } ) ) ) , Times . Once ) ;
343349 EventDispatcherMock . Verify ( dispatcher => dispatcher . DispatchEvent ( It . IsAny < LogEvent > ( ) ) ,
344350 Times . Once ) ;
@@ -405,6 +411,12 @@ public void TestDecisionNotificationSentWhenSendFlagDecisionsTrueAndFeature()
405411 {
406412 "decisionEventDispatched" , true
407413 } ,
414+ {
415+ "experimentId" , "7718750065"
416+ } ,
417+ {
418+ "variationId" , "7713030086"
419+ }
408420 } ) ) ) , Times . Once ) ;
409421 EventDispatcherMock . Verify ( dispatcher => dispatcher . DispatchEvent ( It . IsAny < LogEvent > ( ) ) ,
410422 Times . Once ) ;
@@ -476,6 +488,12 @@ public void TestDecisionNotificationNotSentWhenSendFlagDecisionsFalseAndRollout(
476488 {
477489 "decisionEventDispatched" , false
478490 } ,
491+ {
492+ "experimentId" , experiment . Id
493+ } ,
494+ {
495+ "variationId" , variation . Id
496+ }
479497 } ) ) ) , Times . Once ) ;
480498 EventDispatcherMock . Verify ( dispatcher => dispatcher . DispatchEvent ( It . IsAny < LogEvent > ( ) ) ,
481499 Times . Never ) ;
@@ -547,6 +565,12 @@ public void TestDecisionNotificationSentWhenSendFlagDecisionsTrueAndRollout()
547565 {
548566 "decisionEventDispatched" , true
549567 } ,
568+ {
569+ "experimentId" , experiment . Id
570+ } ,
571+ {
572+ "variationId" , variation . Id
573+ }
550574 } ) ) ) , Times . Once ) ;
551575 EventDispatcherMock . Verify ( dispatcher => dispatcher . DispatchEvent ( It . IsAny < LogEvent > ( ) ) ,
552576 Times . Once ) ;
@@ -2361,8 +2385,7 @@ public void
23612385 Assert . AreEqual ( expectedValue , variableValue ) ;
23622386
23632387 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2364- $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey
2365- } "" of feature flag ""{ featureKey } "".") ) ;
2388+ $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey } "" of feature flag ""{ featureKey } "".") ) ;
23662389 }
23672390
23682391 [ Test ]
@@ -2406,8 +2429,7 @@ public void
24062429 Assert . AreEqual ( expectedValue , variableValue ) ;
24072430
24082431 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2409- $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey
2410- } "" of feature flag ""{ featureKey } "".") ) ;
2432+ $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey } "" of feature flag ""{ featureKey } "".") ) ;
24112433 }
24122434
24132435 [ Test ]
@@ -2439,8 +2461,7 @@ public void
24392461 Assert . AreEqual ( expectedValue , variableValue ) ;
24402462
24412463 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2442- $@ "Feature ""{ featureKey } "" is not enabled for user { TestUserId
2443- } . Returning the default variable value ""{ variableValue } "".") ) ;
2464+ $@ "Feature ""{ featureKey } "" is not enabled for user { TestUserId } . Returning the default variable value ""{ variableValue } "".") ) ;
24442465 }
24452466
24462467 [ Test ]
@@ -2484,8 +2505,7 @@ public void
24842505 Assert . AreEqual ( expectedValue , variableValue ) ;
24852506
24862507 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2487- $@ "Feature ""{ featureKey } "" is not enabled for user { TestUserId
2488- } . Returning the default variable value ""{ variableValue } "".") ) ;
2508+ $@ "Feature ""{ featureKey } "" is not enabled for user { TestUserId } . Returning the default variable value ""{ variableValue } "".") ) ;
24892509 }
24902510
24912511 [ Test ]
@@ -2515,8 +2535,7 @@ public void
25152535 Assert . AreEqual ( expectedValue , variableValue ) ;
25162536
25172537 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2518- $@ "Got variable value ""true"" for variable ""{ variableKey } "" of feature flag ""{
2519- featureKey } ""." ) ) ;
2538+ $@ "Got variable value ""true"" for variable ""{ variableKey } "" of feature flag ""{ featureKey } "".") ) ;
25202539 }
25212540
25222541 [ Test ]
@@ -2562,8 +2581,7 @@ public void
25622581 Assert . AreEqual ( expectedStringValue , variableValue . GetValue < string > ( "string_var" ) ) ;
25632582
25642583 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2565- $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey
2566- } "" of feature flag ""{ featureKey } "".") ) ;
2584+ $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey } "" of feature flag ""{ featureKey } "".") ) ;
25672585 }
25682586
25692587 [ Test ]
@@ -2609,8 +2627,7 @@ public void
26092627 Assert . AreEqual ( expectedStringValue , variableValue . GetValue < string > ( "string_var" ) ) ;
26102628
26112629 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2612- $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey
2613- } "" of feature flag ""{ featureKey } "".") ) ;
2630+ $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey } "" of feature flag ""{ featureKey } "".") ) ;
26142631 }
26152632
26162633 [ Test ]
@@ -2654,8 +2671,7 @@ public void
26542671 Assert . AreEqual ( expectedValue , variableValue ) ;
26552672
26562673 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2657- $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey
2658- } "" of feature flag ""{ featureKey } "".") ) ;
2674+ $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey } "" of feature flag ""{ featureKey } "".") ) ;
26592675 }
26602676
26612677 [ Test ]
@@ -2684,8 +2700,7 @@ public void
26842700 variableKey , TestUserId , null ) ;
26852701 Assert . AreEqual ( expectedValue , variableValue ) ;
26862702 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2687- $@ "Feature ""{ featureKey } "" is not enabled for user { TestUserId
2688- } . Returning the default variable value ""true"".") ) ;
2703+ $@ "Feature ""{ featureKey } "" is not enabled for user { TestUserId } . Returning the default variable value ""true"".") ) ;
26892704 }
26902705
26912706 [ Test ]
@@ -2728,8 +2743,7 @@ public void
27282743 Assert . AreEqual ( expectedValue , variableValue ) ;
27292744
27302745 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2731- $@ "Feature ""{ featureKey } "" is not enabled for user { TestUserId
2732- } . Returning the default variable value ""{ variableValue } "".") ) ;
2746+ $@ "Feature ""{ featureKey } "" is not enabled for user { TestUserId } . Returning the default variable value ""{ variableValue } "".") ) ;
27332747 }
27342748
27352749 [ Test ]
@@ -2758,8 +2772,7 @@ public void
27582772 Assert . AreEqual ( expectedValue , variableValue ) ;
27592773
27602774 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2761- $@ "User ""{ TestUserId } "" is not in any variation for feature flag ""{ featureKey
2762- } "", returning default value ""{ variableValue } "".") ) ;
2775+ $@ "User ""{ TestUserId } "" is not in any variation for feature flag ""{ featureKey } "", returning default value ""{ variableValue } "".") ) ;
27632776 }
27642777
27652778 #endregion Feature Toggle Tests
@@ -2822,8 +2835,7 @@ public void TestGetFeatureVariableValueForTypeGivenFeatureKeyOrVariableKeyNotFou
28222835 LoggerMock . Verify ( l =>
28232836 l . Log ( LogLevel . ERROR , $@ "Feature key ""{ featureKey } "" is not in datafile.") ) ;
28242837 LoggerMock . Verify ( l => l . Log ( LogLevel . ERROR ,
2825- $@ "No feature variable was found for key ""{ variableKey
2826- } "" in feature flag ""double_single_variable_feature"".") ) ;
2838+ $@ "No feature variable was found for key ""{ variableKey } "" in feature flag ""double_single_variable_feature"".") ) ;
28272839 }
28282840
28292841 // Should return null and log error message when variable type is invalid.
@@ -2851,17 +2863,13 @@ public void TestGetFeatureVariableValueForTypeGivenInvalidVariableType()
28512863 "string_single_variable_feature" , "json_var" , TestUserId , null , variableTypeInt ) ) ;
28522864
28532865 LoggerMock . Verify ( l => l . Log ( LogLevel . ERROR ,
2854- $@ "Variable is of type ""double"", but you requested it as type ""{ variableTypeBool
2855- } "".") ) ;
2866+ $@ "Variable is of type ""double"", but you requested it as type ""{ variableTypeBool } "".") ) ;
28562867 LoggerMock . Verify ( l => l . Log ( LogLevel . ERROR ,
2857- $@ "Variable is of type ""boolean"", but you requested it as type ""{
2858- variableTypeDouble } ""." ) ) ;
2868+ $@ "Variable is of type ""boolean"", but you requested it as type ""{ variableTypeDouble } "".") ) ;
28592869 LoggerMock . Verify ( l => l . Log ( LogLevel . ERROR ,
2860- $@ "Variable is of type ""integer"", but you requested it as type ""{
2861- variableTypeString } ""." ) ) ;
2870+ $@ "Variable is of type ""integer"", but you requested it as type ""{ variableTypeString } "".") ) ;
28622871 LoggerMock . Verify ( l => l . Log ( LogLevel . ERROR ,
2863- $@ "Variable is of type ""string"", but you requested it as type ""{ variableTypeInt
2864- } "".") ) ;
2872+ $@ "Variable is of type ""string"", but you requested it as type ""{ variableTypeInt } "".") ) ;
28652873 }
28662874
28672875 [ Test ]
@@ -2913,8 +2921,7 @@ public void TestGetFeatureVariableValueForTypeGivenFeatureFlagIsNotEnabledForUse
29132921 Assert . AreEqual ( expectedValue , variableValue ) ;
29142922
29152923 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2916- $@ "Feature ""{ featureKey } "" is not enabled for user { TestUserId
2917- } . Returning the default variable value ""{ variableValue } "".") ) ;
2924+ $@ "Feature ""{ featureKey } "" is not enabled for user { TestUserId } . Returning the default variable value ""{ variableValue } "".") ) ;
29182925 }
29192926
29202927 // Should return default value and log message when feature is enabled for the user
@@ -2954,9 +2961,7 @@ public void
29542961 Assert . AreEqual ( expectedValue , variableValue ) ;
29552962
29562963 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2957- $@ "Variable ""{ variableKey
2958- } "" is not used in variation ""control"", returning default value ""{ expectedValue
2959- } "".") ) ;
2964+ $@ "Variable ""{ variableKey } "" is not used in variation ""control"", returning default value ""{ expectedValue } "".") ) ;
29602965 }
29612966
29622967 // Should return variable value from variation and log message when feature is enabled for the user
@@ -2994,8 +2999,7 @@ public void
29942999 Assert . AreEqual ( expectedValue , variableValue ) ;
29953000
29963001 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
2997- $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey
2998- } "" of feature flag ""{ featureKey } "".") ) ;
3002+ $@ "Got variable value ""{ variableValue } "" for variable ""{ variableKey } "" of feature flag ""{ featureKey } "".") ) ;
29993003 }
30003004
30013005 // Verify that GetFeatureVariableValueForType returns correct variable value for rollout rule.
@@ -3149,8 +3153,7 @@ public void TestIsFeatureEnabledGivenFeatureFlagIsEnabledAndUserIsNotBeingExperi
31493153
31503154 // SendImpressionEvent() does not get called.
31513155 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
3152- $@ "The user ""{ TestUserId } "" is not being experimented on feature ""{ featureKey
3153- } "".") , Times . Once ) ;
3156+ $@ "The user ""{ TestUserId } "" is not being experimented on feature ""{ featureKey } "".") , Times . Once ) ;
31543157
31553158 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
31563159 $@ "Feature flag ""{ featureKey } "" is enabled for user ""{ TestUserId } "".") ) ;
@@ -3183,8 +3186,7 @@ public void TestIsFeatureEnabledGivenFeatureFlagIsEnabledAndUserIsBeingExperimen
31833186
31843187 // SendImpressionEvent() gets called.
31853188 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
3186- $@ "The user ""{ TestUserId } "" is not being experimented on feature ""{ featureKey
3187- } "".") , Times . Never ) ;
3189+ $@ "The user ""{ TestUserId } "" is not being experimented on feature ""{ featureKey } "".") , Times . Never ) ;
31883190
31893191 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
31903192 $@ "Feature flag ""{ featureKey } "" is enabled for user ""{ TestUserId } "".") ) ;
@@ -3218,8 +3220,7 @@ public void TestIsFeatureEnabledGivenFeatureFlagIsNotEnabledAndUserIsBeingExperi
32183220
32193221 // SendImpressionEvent() gets called.
32203222 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
3221- $@ "The user ""{ TestUserId } "" is not being experimented on feature ""{ featureKey
3222- } "".") , Times . Never ) ;
3223+ $@ "The user ""{ TestUserId } "" is not being experimented on feature ""{ featureKey } "".") , Times . Never ) ;
32233224
32243225 LoggerMock . Verify ( l => l . Log ( LogLevel . INFO ,
32253226 $@ "Feature flag ""{ featureKey } "" is not enabled for user ""{ TestUserId } "".") ) ;
0 commit comments