Skip to content

Commit

Permalink
chore: spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswk committed Nov 28, 2024
1 parent e6f878b commit 0c18a56
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/test/java/io/getunleash/UnleashContextTest.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.getunleash;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.data.MapEntry.entry;

import io.getunleash.util.UnleashConfig;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.data.MapEntry.entry;

public class UnleashContextTest {

@Test
Expand Down Expand Up @@ -104,13 +104,14 @@ class BuilderTest {

@Test
void should_set_special_properties() {
final UnleashContext context = UnleashContext.builder()
.addProperty("userId", "[email protected]")
.addProperty("sessionId", "123")
.addProperty("remoteAddress", "127.0.0.1")
.addProperty("environment", "env")
.addProperty("appName", "myApp")
.build();
final UnleashContext context =
UnleashContext.builder()
.addProperty("userId", "[email protected]")
.addProperty("sessionId", "123")
.addProperty("remoteAddress", "127.0.0.1")
.addProperty("environment", "env")
.addProperty("appName", "myApp")
.build();

assertThat(context.getUserId()).contains("[email protected]");
assertThat(context.getSessionId()).contains("123");
Expand All @@ -121,13 +122,10 @@ void should_set_special_properties() {

@Test
void should_set_non_special_properties() {
final UnleashContext context = UnleashContext.builder()
.addProperty("foo", "bar")
.build();
final UnleashContext context =
UnleashContext.builder().addProperty("foo", "bar").build();

assertThat(context.getProperties()).containsExactly(entry("foo", "bar"));
}

}

}

0 comments on commit 0c18a56

Please sign in to comment.