Skip to content

Commit

Permalink
fix: University tests
Browse files Browse the repository at this point in the history
Extended the expected regex to include a few characters with accents.

Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
  • Loading branch information
kingthorin authored and asolntsev committed Oct 28, 2024
1 parent e90e297 commit 9efbce1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@

class UniversityTest extends BaseFakerTest<BaseFaker> {

private static final String UNIVERSITY_MATCHER = "[A-Za-z'() öèü-]+";
private final University university = faker.university();

@Test
void testName() {
assertThat(university.name()).matches("[A-Za-z'() ]+");
assertThat(university.name()).matches(UNIVERSITY_MATCHER);
}

@Override
protected Collection<TestSpec> providerListTest() {
return List.of(TestSpec.of(university::prefix, "university.prefix"),
TestSpec.of(university::suffix, "university.suffix"),
TestSpec.of(university::degree, "university.degree"),
TestSpec.of(university::place, "university.place"));
TestSpec.of(university::place, "university.place", UNIVERSITY_MATCHER));
}
}

0 comments on commit 9efbce1

Please sign in to comment.