@@ -19,6 +19,7 @@ package ru.mystamps.web.service
19
19
20
20
import static io.qala.datagen.RandomShortApi.bool
21
21
import static io.qala.datagen.RandomShortApi.nullOr
22
+ import static io.qala.datagen.RandomShortApi.positiveLong
22
23
23
24
import org.springframework.web.multipart.MultipartFile
24
25
@@ -547,7 +548,7 @@ class SeriesServiceImplTest extends Specification {
547
548
548
549
def " countAll() should call dao and returns result" () {
549
550
given :
550
- long expectedResult = 20
551
+ long expectedResult = positiveLong()
551
552
when :
552
553
long result = service. countAll()
553
554
then :
@@ -562,7 +563,7 @@ class SeriesServiceImplTest extends Specification {
562
563
563
564
def " countAllStamps() should call dao and returns result" () {
564
565
given :
565
- long expectedResult = 30
566
+ long expectedResult = positiveLong()
566
567
when :
567
568
long result = service. countAllStamps()
568
569
then :
@@ -588,7 +589,7 @@ class SeriesServiceImplTest extends Specification {
588
589
when :
589
590
service. countSeriesOf(expectedCollectionId)
590
591
then :
591
- 1 * seriesDao. countSeriesOfCollection(expectedCollectionId) >> 0L
592
+ 1 * seriesDao. countSeriesOfCollection(expectedCollectionId) >> positiveLong()
592
593
}
593
594
594
595
//
@@ -608,7 +609,7 @@ class SeriesServiceImplTest extends Specification {
608
609
when :
609
610
service. countStampsOf(expectedCollectionId)
610
611
then :
611
- 1 * seriesDao. countStampsOfCollection(expectedCollectionId) >> 0L
612
+ 1 * seriesDao. countStampsOfCollection(expectedCollectionId) >> positiveLong()
612
613
}
613
614
614
615
//
@@ -626,7 +627,7 @@ class SeriesServiceImplTest extends Specification {
626
627
given :
627
628
Date expectedDate = new Date ()
628
629
and :
629
- long expectedResult = 35
630
+ long expectedResult = positiveLong()
630
631
when :
631
632
long result = service. countAddedSince(expectedDate)
632
633
then :
@@ -650,7 +651,7 @@ class SeriesServiceImplTest extends Specification {
650
651
given :
651
652
Date expectedDate = new Date ()
652
653
and :
653
- long expectedResult = 45
654
+ long expectedResult = positiveLong()
654
655
when :
655
656
long result = service. countUpdatedSince(expectedDate)
656
657
then :
0 commit comments