Skip to content

Commit 2423b54

Browse files
committed
refactor(CountryServiceImplTest): use random values in getStatisticsOf() tests.
Address to #300
1 parent f6c82ec commit 2423b54

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/groovy/ru/mystamps/web/feature/country/CountryServiceImplTest.groovy

+3-3
Original file line numberDiff line numberDiff line change
@@ -456,17 +456,17 @@ class CountryServiceImplTest extends Specification {
456456

457457
def 'getStatisticsOf() should throw exception when collection id is null'() {
458458
when:
459-
service.getStatisticsOf(null, 'whatever')
459+
service.getStatisticsOf(null, Random.lang())
460460
then:
461461
IllegalArgumentException ex = thrown()
462462
ex.message == 'Collection id must be non null'
463463
}
464464

465465
def 'getStatisticsOf() should pass arguments to dao'() {
466466
given:
467-
Integer expectedCollectionId = 17
467+
Integer expectedCollectionId = Random.id()
468468
and:
469-
String expectedLang = 'expected'
469+
String expectedLang = Random.lang()
470470
when:
471471
service.getStatisticsOf(expectedCollectionId, expectedLang)
472472
then:

0 commit comments

Comments
 (0)