added more aviation tests

This commit is contained in:
Ricky
2019-08-18 17:39:31 +10:00
parent 9713dd3e64
commit dddc00fbc7
@@ -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());
}
}