Skip to content

Commit 51a5393

Browse files
committed
SeriesServiceImplTest: propagate positiveLong().
Addressed to #300 No functional changes.
1 parent d3a5984 commit 51a5393

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/test/groovy/ru/mystamps/web/service/SeriesServiceImplTest.groovy

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package ru.mystamps.web.service
1919

2020
import static io.qala.datagen.RandomShortApi.bool
2121
import static io.qala.datagen.RandomShortApi.nullOr
22+
import static io.qala.datagen.RandomShortApi.positiveLong
2223

2324
import org.springframework.web.multipart.MultipartFile
2425

@@ -547,7 +548,7 @@ class SeriesServiceImplTest extends Specification {
547548

548549
def "countAll() should call dao and returns result"() {
549550
given:
550-
long expectedResult = 20
551+
long expectedResult = positiveLong()
551552
when:
552553
long result = service.countAll()
553554
then:
@@ -562,7 +563,7 @@ class SeriesServiceImplTest extends Specification {
562563

563564
def "countAllStamps() should call dao and returns result"() {
564565
given:
565-
long expectedResult = 30
566+
long expectedResult = positiveLong()
566567
when:
567568
long result = service.countAllStamps()
568569
then:
@@ -588,7 +589,7 @@ class SeriesServiceImplTest extends Specification {
588589
when:
589590
service.countSeriesOf(expectedCollectionId)
590591
then:
591-
1 * seriesDao.countSeriesOfCollection(expectedCollectionId) >> 0L
592+
1 * seriesDao.countSeriesOfCollection(expectedCollectionId) >> positiveLong()
592593
}
593594

594595
//
@@ -608,7 +609,7 @@ class SeriesServiceImplTest extends Specification {
608609
when:
609610
service.countStampsOf(expectedCollectionId)
610611
then:
611-
1 * seriesDao.countStampsOfCollection(expectedCollectionId) >> 0L
612+
1 * seriesDao.countStampsOfCollection(expectedCollectionId) >> positiveLong()
612613
}
613614

614615
//
@@ -626,7 +627,7 @@ class SeriesServiceImplTest extends Specification {
626627
given:
627628
Date expectedDate = new Date()
628629
and:
629-
long expectedResult = 35
630+
long expectedResult = positiveLong()
630631
when:
631632
long result = service.countAddedSince(expectedDate)
632633
then:
@@ -650,7 +651,7 @@ class SeriesServiceImplTest extends Specification {
650651
given:
651652
Date expectedDate = new Date()
652653
and:
653-
long expectedResult = 45
654+
long expectedResult = positiveLong()
654655
when:
655656
long result = service.countUpdatedSince(expectedDate)
656657
then:

0 commit comments

Comments
 (0)