Skip to content

Commit

Permalink
fixing bundlebee-uppercase implementation in placeholders (was doing …
Browse files Browse the repository at this point in the history
…a lowercase for now)
  • Loading branch information
rmannibucau committed Apr 19, 2023
1 parent 78df63a commit 707b3c3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ protected String doSubstitute(final AtomicReference<Substitutor> self, final Con
}
}
if (placeholder.startsWith("bundlebee-uppercase:")) {
return placeholder.substring("bundlebee-uppercase:".length()).toLowerCase(ROOT);
return placeholder.substring("bundlebee-uppercase:".length()).toUpperCase(ROOT);
}
if (placeholder.startsWith("bundlebee-lowercase:")) {
return placeholder.substring("bundlebee-lowercase:".length()).toLowerCase(ROOT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ public <U extends OnPlaceholder> Event<U> select(final TypeLiteral<U> subtype, f
}
}

@Test
void uppercase() {
assertEquals(
"UP",
substitutor.getOrDefault("bundlebee-uppercase:up", "failed"));
}

@Test
void digest() {
assertEquals(
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
Expand All @@ -198,7 +198,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.0.0</version>
<configuration>
<environmentVariables>
<TEST_ENV_VAR>set</TEST_ENV_VAR>
Expand Down

0 comments on commit 707b3c3

Please # to comment.