Skip to content

Commit 962ff0b

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

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,8 @@ 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(
31+
"testFlagKey", FlagValueType.BOOLEAN, null, null, TestUtils.defaultEvaluationContext, "default");
3632
val res = hook.before(hookContext, null);
3733
assertEquals(Optional.of(hookContext.getCtx()), res);
3834
}
@@ -42,12 +38,8 @@ void shouldReturnSameContextIfNoMetadataProvided() {
4238
@Test
4339
void shouldReturnSameContextIfMetadataEmpty() {
4440
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();
41+
val hookContext = HookContext.<String>from(
42+
"testFlagKey", FlagValueType.BOOLEAN, null, null, TestUtils.defaultEvaluationContext, "default");
5143
val res = hook.before(hookContext, null);
5244
assertEquals(Optional.of(hookContext.getCtx()), res);
5345
}

0 commit comments

Comments
 (0)