Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class NoOpTransactionContextPropagator implements TransactionContextPropa
*/
@Override
public EvaluationContext getTransactionContext() {
return new ImmutableContext();
return ImmutableContext.EMPTY;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.openfeature.sdk;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.*;

import java.util.HashMap;
Expand All @@ -16,6 +17,11 @@ public void emptyTransactionContext() {
assertTrue(result.asMap().isEmpty());
}

@Test
public void getTransactionContextReturnsEmptySingleton() {
assertThat(contextPropagator.getTransactionContext()).isSameAs(ImmutableContext.EMPTY);
}

@Test
public void setTransactionContext() {
Map<String, Value> transactionAttrs = new HashMap<>();
Expand Down
Loading