Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9713dd3
commit dddc00f
Showing
1 changed file
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()); | ||
} | ||
} |