File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -656,5 +656,25 @@ public async Task TheClient_MergesTheEvaluationContextInTheCorrectOrder(string k
656
656
657
657
Assert . Equal ( expectedResult , actualEvaluationContext . GetValue ( key ) . AsString ) ;
658
658
}
659
+
660
+ [ Fact ]
661
+ [ Specification ( "4.3.8" , "'evaluation details' passed to the 'finally' stage matches the evaluation details returned to the application author" ) ]
662
+ public async Task FinallyHook_IncludesEvaluationDetails ( )
663
+ {
664
+ // Arrange
665
+ var provider = new TestProvider ( ) ;
666
+ var providerHook = Substitute . For < Hook > ( ) ;
667
+ provider . AddHook ( providerHook ) ;
668
+ await Api . Instance . SetProviderAsync ( provider ) ;
669
+ var client = Api . Instance . GetClient ( ) ;
670
+
671
+ const string flagName = "flagName" ;
672
+
673
+ // Act
674
+ var evaluationDetails = await client . GetBooleanDetailsAsync ( flagName , true ) ;
675
+
676
+ // Assert
677
+ await providerHook . Received ( 1 ) . FinallyAsync ( Arg . Any < HookContext < bool > > ( ) , evaluationDetails ) ;
678
+ }
659
679
}
660
680
}
You can’t perform that action at this time.
0 commit comments