Skip to content

Commit

Permalink
added more aviation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
codingricky committed Aug 18, 2019
1 parent 9713dd3 commit dddc00f
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/test/java/com/github/javafaker/AviationTest.java
@@ -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());
}
}

0 comments on commit dddc00f

Please sign in to comment.