@@ -411,7 +411,8 @@ class SeriesImportServiceImplTest extends Specification {
411
411
Random . countryName(),
412
412
null , /* imageUrl */
413
413
Random . issueYear(). toString(),
414
- Random . quantity(). toString()
414
+ Random . quantity(). toString(),
415
+ String . valueOf(Random . perforated())
415
416
)
416
417
and :
417
418
extractorService. extractCategory(_ as String ) >> Collections . emptyList()
@@ -436,7 +437,8 @@ class SeriesImportServiceImplTest extends Specification {
436
437
Random . countryName(),
437
438
expectedImageUrl,
438
439
Random . issueYear(). toString(),
439
- Random . quantity(). toString()
440
+ Random . quantity(). toString(),
441
+ String . valueOf(Random . perforated())
440
442
)
441
443
and :
442
444
extractorService. extractCategory(_ as String ) >> Collections . emptyList()
@@ -467,13 +469,15 @@ class SeriesImportServiceImplTest extends Specification {
467
469
Integer expectedCategoryId = expectedCategoryIds. get(0 )
468
470
Integer expectedCountryId = expectedCountryIds. get(0 )
469
471
Integer expectedQuantity = Random . quantity()
472
+ Boolean expectedPerforated = Random . perforated()
470
473
and :
471
474
RawParsedDataDto parsedData = new RawParsedDataDto (
472
475
expectedCategoryName,
473
476
expectedCountryName,
474
477
Random . url(),
475
478
expectedReleaseYear. toString(),
476
- expectedQuantity. toString()
479
+ expectedQuantity. toString(),
480
+ expectedPerforated. toString()
477
481
)
478
482
when :
479
483
service. saveParsedData(expectedRequestId, parsedData)
@@ -485,6 +489,8 @@ class SeriesImportServiceImplTest extends Specification {
485
489
1 * extractorService. extractReleaseYear(expectedReleaseYear. toString()) >> expectedReleaseYear
486
490
and :
487
491
1 * extractorService. extractQuantity(expectedQuantity. toString()) >> expectedQuantity
492
+ and :
493
+ 1 * extractorService. extractPerforated(expectedPerforated. toString()) >> expectedPerforated
488
494
and :
489
495
1 * seriesImportDao. addParsedContent(
490
496
expectedRequestId,
@@ -493,6 +499,7 @@ class SeriesImportServiceImplTest extends Specification {
493
499
assert saveParsedData?. countryId == expectedCountryId
494
500
assert saveParsedData?. releaseYear == expectedReleaseYear
495
501
assert saveParsedData?. quantity == expectedQuantity
502
+ assert saveParsedData?. perforated == expectedPerforated
496
503
return true
497
504
}
498
505
)
0 commit comments