Modified regular expression for Hospital Name

This commit is contained in:
Vikram
2018-09-25 16:34:52 +05:30
parent 414c2c8a7d
commit ea463fed2b
@@ -9,16 +9,19 @@ public class MedicalTest extends AbstractFakerTest {
@Test
public void testMedicineName() {
assertThat(faker.medical().medicineName(), matchesRegularExpression("([\\w']+\\.?( )?){2,4}"));
assertThat(faker.medical().medicineName(), matchesRegularExpression("([\\w']+\\.?( )?){2,5}"));
}
@Test
public void testDiseaseName() {
assertThat(faker.medical().diseaseName(), matchesRegularExpression("([\\w']+\\.?( )?){2,4}"));
}
@Test
public void testHospitalName() {
assertThat(faker.medical().hospitalName(), matchesRegularExpression("([\\w']+\\.?( )?){2,4}"));
assertThat(faker.medical().hospitalName(), matchesRegularExpression("([\\w']+\\.?( )?){2,8}"));
}
@Test
public void testSymptom() {
assertThat(faker.medical().symptoms(), matchesRegularExpression("([\\w']+\\.?.\\(?[\\w']\\)?( )?){2,4}"));
@@ -30,4 +33,9 @@ public class MedicalTest extends AbstractFakerTest {
assertThat("Infertility (Female)", matchesRegularExpression("([\\w']+\\.?.\\(?[\\w']\\)?( )?){2,4}"));
}
@Test
public void testHospitalStatic() {
assertThat("ST VINCENT SALEM HOSPITAL INC", matchesRegularExpression("([\\w']+\\.?.\\(?[\\w']\\)?( )?){2,5}"));
}
}