Skip to content

Commit ba0e191

Browse files
committed
fixup: adapt tests to the new sdk version
Signed-off-by: Simon Schrottner <[email protected]>
1 parent cbf8fc2 commit ba0e191

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

providers/go-feature-flag/src/test/java/dev/openfeature/contrib/providers/gofeatureflag/hook/EnrichEvaluationContextHookTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ void shouldReturnNothingIfNoOptionsProvided() {
2727
@Test
2828
void shouldReturnSameContextIfNoMetadataProvided() {
2929
EnrichEvaluationContextHook hook = new EnrichEvaluationContextHook(null);
30-
val hookContext = HookContext.<String>builder()
31-
.ctx(TestUtils.defaultEvaluationContext)
32-
.flagKey("testFlagKey")
33-
.type(FlagValueType.BOOLEAN)
34-
.defaultValue("default")
35-
.build();
30+
val hookContext = HookContext.<String>from("testFlagKey",
31+
FlagValueType.BOOLEAN,
32+
null,
33+
null,
34+
TestUtils.defaultEvaluationContext,
35+
"default");
3636
val res = hook.before(hookContext, null);
3737
assertEquals(Optional.of(hookContext.getCtx()), res);
3838
}
@@ -42,12 +42,12 @@ void shouldReturnSameContextIfNoMetadataProvided() {
4242
@Test
4343
void shouldReturnSameContextIfMetadataEmpty() {
4444
EnrichEvaluationContextHook hook = new EnrichEvaluationContextHook(Collections.emptyMap());
45-
val hookContext = HookContext.<String>builder()
46-
.ctx(TestUtils.defaultEvaluationContext)
47-
.flagKey("testFlagKey")
48-
.type(FlagValueType.BOOLEAN)
49-
.defaultValue("default")
50-
.build();
45+
val hookContext = HookContext.<String>from("testFlagKey",
46+
FlagValueType.BOOLEAN,
47+
null,
48+
null,
49+
TestUtils.defaultEvaluationContext,
50+
"default");
5151
val res = hook.before(hookContext, null);
5252
assertEquals(Optional.of(hookContext.getCtx()), res);
5353
}

0 commit comments

Comments
 (0)