@@ -24,34 +24,34 @@ public class ProviderSpecTest {
24
24
@ Specification (number ="2.9.1" , text ="The flag resolution structure SHOULD accept a generic " +
25
25
"argument (or use an equivalent language feature) which indicates the type of the wrapped value field." )
26
26
@ Test void flag_value_set () {
27
- ProviderEvaluation <Integer > int_result = p .getIntegerEvaluation ("key" , 4 , new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
27
+ ProviderEvaluation <Integer > int_result = p .getIntegerEvaluation ("key" , 4 , new EvaluationContext ());
28
28
assertNotNull (int_result .getValue ());
29
29
30
- ProviderEvaluation <Double > double_result = p .getDoubleEvaluation ("key" , 0.4 , new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
30
+ ProviderEvaluation <Double > double_result = p .getDoubleEvaluation ("key" , 0.4 , new EvaluationContext ());
31
31
assertNotNull (double_result .getValue ());
32
32
33
- ProviderEvaluation <String > string_result = p .getStringEvaluation ("key" , "works" , new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
33
+ ProviderEvaluation <String > string_result = p .getStringEvaluation ("key" , "works" , new EvaluationContext ());
34
34
assertNotNull (string_result .getValue ());
35
35
36
- ProviderEvaluation <Boolean > boolean_result = p .getBooleanEvaluation ("key" , false , new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
36
+ ProviderEvaluation <Boolean > boolean_result = p .getBooleanEvaluation ("key" , false , new EvaluationContext ());
37
37
assertNotNull (boolean_result .getValue ());
38
38
39
- ProviderEvaluation <Structure > object_result = p .getObjectEvaluation ("key" , new Structure (), new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
39
+ ProviderEvaluation <Structure > object_result = p .getObjectEvaluation ("key" , new Structure (), new EvaluationContext ());
40
40
assertNotNull (object_result .getValue ());
41
41
42
42
}
43
43
44
44
@ Specification (number ="2.6" , text ="The provider SHOULD populate the flag resolution structure's " +
45
45
"reason field with a string indicating the semantic reason for the returned flag value." )
46
46
@ Test void has_reason () {
47
- ProviderEvaluation <Boolean > result = p .getBooleanEvaluation ("key" , false , new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
47
+ ProviderEvaluation <Boolean > result = p .getBooleanEvaluation ("key" , false , new EvaluationContext ());
48
48
assertEquals (Reason .DEFAULT , result .getReason ());
49
49
}
50
50
51
51
@ Specification (number ="2.7" , text ="In cases of normal execution, the provider MUST NOT populate " +
52
52
"the flag resolution structure's error code field, or otherwise must populate it with a null or falsy value." )
53
53
@ Test void no_error_code_by_default () {
54
- ProviderEvaluation <Boolean > result = p .getBooleanEvaluation ("key" , false , new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
54
+ ProviderEvaluation <Boolean > result = p .getBooleanEvaluation ("key" , false , new EvaluationContext ());
55
55
assertNull (result .getErrorCode ());
56
56
}
57
57
@@ -63,16 +63,16 @@ public class ProviderSpecTest {
63
63
@ Specification (number ="2.5" , text ="In cases of normal execution, the provider SHOULD populate the " +
64
64
"flag resolution structure's variant field with a string identifier corresponding to the returned flag value." )
65
65
@ Test void variant_set () {
66
- ProviderEvaluation <Integer > int_result = p .getIntegerEvaluation ("key" , 4 , new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
66
+ ProviderEvaluation <Integer > int_result = p .getIntegerEvaluation ("key" , 4 , new EvaluationContext ());
67
67
assertNotNull (int_result .getReason ());
68
68
69
- ProviderEvaluation <Double > double_result = p .getDoubleEvaluation ("key" , 0.4 , new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
69
+ ProviderEvaluation <Double > double_result = p .getDoubleEvaluation ("key" , 0.4 , new EvaluationContext ());
70
70
assertNotNull (double_result .getReason ());
71
71
72
- ProviderEvaluation <String > string_result = p .getStringEvaluation ("key" , "works" , new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
72
+ ProviderEvaluation <String > string_result = p .getStringEvaluation ("key" , "works" , new EvaluationContext ());
73
73
assertNotNull (string_result .getReason ());
74
74
75
- ProviderEvaluation <Boolean > boolean_result = p .getBooleanEvaluation ("key" , false , new EvaluationContext (), FlagEvaluationOptions . builder (). build () );
75
+ ProviderEvaluation <Boolean > boolean_result = p .getBooleanEvaluation ("key" , false , new EvaluationContext ());
76
76
assertNotNull (boolean_result .getReason ());
77
77
}
78
78
0 commit comments