Skip to content

Commit 6c7d383

Browse files
authored
Merge pull request eugenp#11538 from Teica/fix-5227
Fix 5227
2 parents ba29be1 + b35c4e8 commit 6c7d383

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core-java-modules/core-java-string-algorithms-3/src/test/java/com/baeldung/isuppercase/StringFirstCharacterUppercaseUnitTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
import org.junit.jupiter.api.TestInstance;
66
import com.google.common.base.Ascii;
77

8-
import static org.hamcrest.MatcherAssert.assertThat;
9-
import static org.hamcrest.Matchers.matchesPattern;
10-
118
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
129
public class StringFirstCharacterUppercaseUnitTest {
1310

@@ -21,7 +18,8 @@ public void givenString_whenCheckingWithCharacterIsUpperCase_thenStringCapitaliz
2118
public void givenString_whenCheckingWithRegex_thenStringCapitalized() {
2219
String example = "Katie";
2320
String regEx = "[A-Z]\\w*";
24-
assertThat(example, matchesPattern(regEx));
21+
22+
Assertions.assertTrue(example.matches(regEx));
2523
}
2624

2725
@Test

0 commit comments

Comments
 (0)