Skip to content

Commit c6b40c7

Browse files
committed
beter test
1 parent 3553fb9 commit c6b40c7

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/test/groovy/io/codearte/jfairy/FairyFrSpec.groovy

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@ import spock.lang.Specification
55

66
class FairyFrSpec extends Specification {
77

8-
def "Second create something French"() {
8+
private final int SEED = 7
9+
private Fairy fairy = Fairy.builder().withRandom(new Random(SEED)).withLocale(Locale.FRENCH).build()
910

10-
given:
11-
Fairy fairy = Fairy.create(Locale.FRENCH);
11+
def "Should create French name"() {
1212
when:
1313
Person person = fairy.person();
1414
then:
15-
println person.fullName()
15+
person.fullName() == 'Normand Besnard'
16+
}
17+
18+
def "Should create French city"() {
19+
when:
20+
Person person = fairy.person();
21+
then:
22+
person.address.city == 'Saint-Laurent-du-Maroni'
1623
}
1724

1825
}

0 commit comments

Comments
 (0)