added more aviation tests
This commit is contained in:
@@ -1,17 +1,25 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
import com.github.javafaker.repeating.Repeat;
|
||||
import org.junit.Test;
|
||||
|
||||
import static com.github.javafaker.matchers.IsStringWithContents.isStringWithContents;
|
||||
import static com.github.javafaker.matchers.MatchesRegularExpression.matchesRegularExpression;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
public class AviationTest extends AbstractFakerTest {
|
||||
|
||||
@Test
|
||||
@Repeat(times=3)
|
||||
public void testAviation() {
|
||||
String airport = faker.aviation().airport();
|
||||
assertThat(airport, matchesRegularExpression("\\w{4}"));
|
||||
public void airport() {
|
||||
assertThat(faker.aviation().airport(), matchesRegularExpression("\\w{4}"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void aircraft() {
|
||||
assertThat(faker.aviation().aircraft(), isStringWithContents());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void metar() {
|
||||
assertThat(faker.aviation().METAR(), isStringWithContents());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user