Skip to content

Commit

Permalink
Remove unnecessary guava usage
Browse files Browse the repository at this point in the history
  • Loading branch information
chadlwilson committed Jul 1, 2023
1 parent 2272a0b commit 59e7ec3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package cd.go.artifact.docker.registry.model;

import com.google.common.collect.ImmutableMap;
import org.junit.jupiter.api.Test;

import java.util.Map;
Expand All @@ -13,7 +12,7 @@ public class EnvironmentVariableResolverTest {
@Test
public void shouldResolveTagPatternWithSingleEnvironmentVariable() throws UnresolvedPropertyException {
EnvironmentVariableResolver environmentVariableResolver = new EnvironmentVariableResolver("v${GO_PIPELINE_COUNTER}", "tag");
Map<String, String> environmentVariables = ImmutableMap.of("GO_PIPELINE_COUNTER", "112");
Map<String, String> environmentVariables = Map.of("GO_PIPELINE_COUNTER", "112");

String tag = environmentVariableResolver.resolve(environmentVariables);

Expand All @@ -23,7 +22,7 @@ public void shouldResolveTagPatternWithSingleEnvironmentVariable() throws Unreso
@Test
public void shouldResolveTagPatternWithMultipleEnvironmentVariables() throws UnresolvedPropertyException {
EnvironmentVariableResolver environmentVariableResolver = new EnvironmentVariableResolver("v${GO_PIPELINE_COUNTER}-${GO_STAGE_COUNTER}", "tag");
Map<String, String> environmentVariables = ImmutableMap.of("GO_PIPELINE_COUNTER", "112",
Map<String, String> environmentVariables = Map.of("GO_PIPELINE_COUNTER", "112",
"GO_STAGE_COUNTER", "1");

String tag = environmentVariableResolver.resolve(environmentVariables);
Expand All @@ -34,7 +33,7 @@ public void shouldResolveTagPatternWithMultipleEnvironmentVariables() throws Unr
@Test
public void shouldThrowExceptionIfTagIsUnresolved() {
EnvironmentVariableResolver environmentVariableResolver = new EnvironmentVariableResolver("v${GO_PIPELINE_COUNTER}-${GO_STAGE_COUNTER}", "tag");
Map<String, String> environmentVariables = ImmutableMap.of("GO_PIPELINE_COUNTER", "112");
Map<String, String> environmentVariables = Map.of("GO_PIPELINE_COUNTER", "112");

boolean exceptionCaught = false;
try {
Expand Down

0 comments on commit 59e7ec3

Please sign in to comment.