Merge pull request #11538 from Teica/fix-5227

Fix 5227
This commit is contained in:
Loredana Crusoveanu 2021-12-02 11:19:16 +02:00 committed by GitHub
commit 3256793b57
1 changed files with 2 additions and 4 deletions

View File

@ -5,9 +5,6 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import com.google.common.base.Ascii;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.matchesPattern;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class StringFirstCharacterUppercaseUnitTest {
@ -21,7 +18,8 @@ public class StringFirstCharacterUppercaseUnitTest {
public void givenString_whenCheckingWithRegex_thenStringCapitalized() {
String example = "Katie";
String regEx = "[A-Z]\\w*";
assertThat(example, matchesPattern(regEx));
Assertions.assertTrue(example.matches(regEx));
}
@Test